Shows how to use a display, the onboard SD Card and the onboard SPI Flash. Requires a display module with direct Arduino pinning
Dependencies: DmTftLibrary SDFileSystem mbed
Revision 2:a77053c4f5cc, committed 2014-07-04
- Comitter:
- displaymodule
- Date:
- Fri Jul 04 10:36:42 2014 +0000
- Parent:
- 1:76ec0e6dfe81
- Child:
- 3:e1e1053e286f
- Commit message:
- Misc bugfixes
Changed in this revision
--- a/DmTftLibrary.lib Tue May 20 15:41:11 2014 +0000 +++ b/DmTftLibrary.lib Fri Jul 04 10:36:42 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/displaymodule/code/DmTftLibrary/#59be7fca4581 +http://mbed.org/users/displaymodule/code/DmTftLibrary/#6cd8c36cbdb3
--- a/main.cpp Tue May 20 15:41:11 2014 +0000 +++ b/main.cpp Fri Jul 04 10:36:42 2014 +0000 @@ -28,8 +28,13 @@ * Typedefs and defines *****************************************************************************/ -#define log(...) printf(__VA_ARGS__) -//#define log(...) +/* Note that there are restrictions on which platforms that can use printf + in combinations with the DmTftLibrary. Some platforms (e.g. LPC1549 LPCXpresso) + use the same pins for USBRX/USBTX and display control. Printing will + cause the display to not work. Read more about this on the display's notebook + page. */ +//#define log(...) printf(__VA_ARGS__) +#define log(...) #define DM_PIN_SPI_MOSI D11 #define DM_PIN_SPI_MISO D12 @@ -44,11 +49,11 @@ * Local variables *****************************************************************************/ -DmTftIli9341 tft; /* DM_TFT28_105 */ -//DmTftSsd2119 tft; /* DM_TFT35_107 */ +//DmTftIli9341 tft; /* DM_TFT28_105 */ +DmTftSsd2119 tft; /* DM_TFT35_107 */ -DmTouch touch(DmTouch::DM_TFT28_105); -//DmTouch touch(DmTouch::DM_TFT35_107); +//DmTouch touch(DmTouch::DM_TFT28_105); +DmTouch touch(DmTouch::DM_TFT35_107); SDFileSystem sd(DM_PIN_SPI_MOSI, DM_PIN_SPI_MISO, DM_PIN_SPI_SCLK, DM_PIN_CS_SDCARD, "sd"); // mosi,miso,clk,cs W25Q16BV flash(DM_PIN_SPI_MOSI, DM_PIN_SPI_MISO, DM_PIN_SPI_SCLK, DM_PIN_CS_FLASH); // mosi,miso,clk,cs
--- a/mbed-src.lib Tue May 20 15:41:11 2014 +0000 +++ b/mbed-src.lib Fri Jul 04 10:36:42 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/displaymodule/code/mbed-src/#3306e8fd8143 +http://mbed.org/users/displaymodule/code/mbed-src/#920c1b531860