Example of using the DM-TFT18-101 display

Dependencies:   DmTftLibrary mbed

Fork of dm_bubbles by Display Module

Files at this revision

API Documentation at this revision

Comitter:
embeddedartists
Date:
Wed Oct 01 11:03:19 2014 +0000
Parent:
3:0ed7f56318a5
Commit message:
Cleanup

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jul 09 08:35:46 2014 +0000
+++ b/main.cpp	Wed Oct 01 11:03:19 2014 +0000
@@ -7,62 +7,17 @@
 #include "BubbleDemo.h"
 
 #include "DmTftHX8353C.h"
-#include "DmTftS6D0164.h"
-#include "DmTftIli9325.h"
-#include "DmTftIli9341.h"
-#include "DmTftSsd2119.h"
 
 /******************************************************************************
  * Typedefs and defines
  *****************************************************************************/
 
-#define RESET_FLAG  \
-  do { \
-    if (abortTest) { \
-      abortTest = false; \
-      wait(0.04); \
-    } \
-  } while(false)
-
-
-#if 0
-  /* Displays without adapter */
-  #define DM_PIN_SPI_MOSI   D11
-  #define DM_PIN_SPI_MISO   D12
-  #define DM_PIN_SPI_SCLK   D13
-  #define DM_PIN_CS_TOUCH   D4
-  #define DM_PIN_CS_TFT     D10
-  #define DM_PIN_CS_SDCARD  D8
-  #define DM_PIN_CS_FLASH   D6
-#else
-  /* Displays with adapter */
-  #define DM_PIN_SPI_MOSI   A0
-  #define DM_PIN_SPI_MISO   D9
-  #define DM_PIN_SPI_SCLK   A1
-  #define DM_PIN_CS_TOUCH   D8
-  #define DM_PIN_CS_TFT     A3
-  #define DM_PIN_CS_SDCARD  D10
-#endif
-
 /******************************************************************************
  * Local variables
  *****************************************************************************/
 
-static InterruptIn buttonInterrupt(P2_10);
-static DigitalOut led(LED1);
-
-//DmTftHX8353C tft;  /* DM_TFT18_101 */
-//DmTftS6D0164 tft;  /* DM_TFT22_102 */
-DmTftIli9325 tft;  /* DM_TFT28_103 and DM_TFT24_104 */
-//DmTftIli9341 tft;  /* DM_TFT28_105 */
-//DmTftSsd2119 tft;   /* DM_TFT35_107 */
-
-DigitalInOut csTouch(DM_PIN_CS_TOUCH, PIN_OUTPUT, PullUp, 1);
-DigitalInOut csDisplay(DM_PIN_CS_TFT, PIN_OUTPUT, PullUp, 1);
-DigitalInOut csSDCard(DM_PIN_CS_SDCARD, PIN_OUTPUT, PullUp, 1);
-#ifdef DM_PIN_CS_FLASH
-  DigitalInOut csFlash(DM_PIN_CS_FLASH, PIN_OUTPUT, PullUp, 1);
-#endif
+/* DM_TFT18_101 */
+DmTftHX8353C tft(p5, p7, p30, p17, p16); // mosi,clk,cs,dc,rst
 
 /******************************************************************************
  * Global variables
@@ -72,6 +27,25 @@
  * Main
  *****************************************************************************/
 
+/*
+ Hardware Setup:
+ 
+ - Jumpers JP1..JP6 should be in position 1-2
+ - Jumpers in J14 should NOT be inserted
+ - Jumper J7 should be inserted
+ - Display in connector J12 (display will be outside of base boards boundaries). 
+*/
+
+/*
+ Test Comments:
+ 
+ - This example is only for the DM-TFT-101 1.8" display as it is the only
+   one with SPI interface AND 40-pin contact   
+ - The display board's sd card cannot be accessed due to missing ChipSelect
+ - The display cannot be used with the MCI interface on the base board as they
+   share p30 (SDCLK and LCD_CS) so use SPI interface to use the base board's uSD 
+*/
+
 int main (void)
 {
     tft.init();
--- a/mbed.bld	Wed Jul 09 08:35:46 2014 +0000
+++ b/mbed.bld	Wed Oct 01 11:03:19 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file