Example of using the DM-TFT18-101 display
Dependencies: DmTftLibrary mbed
Fork of dm_bubbles by
main.cpp
00001 /****************************************************************************** 00002 * Includes 00003 *****************************************************************************/ 00004 00005 #include "mbed.h" 00006 00007 #include "BubbleDemo.h" 00008 00009 #include "DmTftHX8353C.h" 00010 00011 /****************************************************************************** 00012 * Typedefs and defines 00013 *****************************************************************************/ 00014 00015 /****************************************************************************** 00016 * Local variables 00017 *****************************************************************************/ 00018 00019 /* DM_TFT18_101 */ 00020 DmTftHX8353C tft(p5, p7, p30, p17, p16); // mosi,clk,cs,dc,rst 00021 00022 /****************************************************************************** 00023 * Global variables 00024 *****************************************************************************/ 00025 00026 /****************************************************************************** 00027 * Main 00028 *****************************************************************************/ 00029 00030 /* 00031 Hardware Setup: 00032 00033 - Jumpers JP1..JP6 should be in position 1-2 00034 - Jumpers in J14 should NOT be inserted 00035 - Jumper J7 should be inserted 00036 - Display in connector J12 (display will be outside of base boards boundaries). 00037 */ 00038 00039 /* 00040 Test Comments: 00041 00042 - This example is only for the DM-TFT-101 1.8" display as it is the only 00043 one with SPI interface AND 40-pin contact 00044 - The display board's sd card cannot be accessed due to missing ChipSelect 00045 - The display cannot be used with the MCI interface on the base board as they 00046 share p30 (SDCLK and LCD_CS) so use SPI interface to use the base board's uSD 00047 */ 00048 00049 int main (void) 00050 { 00051 tft.init(); 00052 00053 BubbleDemo bubbleDemo(&tft, tft.width(), tft.height()); 00054 while (1) { 00055 bubbleDemo.run(750, 20); 00056 } 00057 }
Generated on Fri Jul 15 2022 12:32:15 by 1.7.2