Added Discovery F429ZI 8 bit SPI support. Added helper methods to character based locate.

Fork of SPI_TFT_ILI9341 by Peter Drescher

Added Discovery F429ZI 8 bit SPI support to the original lib.

Revision:
15:b7848705d2ab
Parent:
14:a1133923c034
--- a/SPI_TFT_ILI9341.h	Sat Feb 11 18:56:31 2017 +0000
+++ b/SPI_TFT_ILI9341.h	Sun Feb 12 10:34:05 2017 +0000
@@ -42,11 +42,48 @@
 #define Orange          0xFD20      /* 255, 165,   0 */
 #define GreenYellow     0xAFE5      /* 173, 255,  47 */
 
+#define LCD_COLOR_BLUE          Blue
+#define LCD_COLOR_GREEN         Green
+#define LCD_COLOR_RED           Red
+#define LCD_COLOR_CYAN          Cyan
+#define LCD_COLOR_MAGENTA       Magenta
+#define LCD_COLOR_YELLOW        Yellow
+//#define LCD_COLOR_LIGHTBLUE     0xFF8080FF
+//#define LCD_COLOR_LIGHTGREEN    0xFF80FF80
+//#define LCD_COLOR_LIGHTRED      0xFFFF8080
+//#define LCD_COLOR_LIGHTCYAN     0xFF80FFFF
+//#define LCD_COLOR_LIGHTMAGENTA  0xFFFF80FF
+//#define LCD_COLOR_LIGHTYELLOW   0xFFFFFF80
+//#define LCD_COLOR_DARKBLUE      0xFF000080
+#define LCD_COLOR_DARKGREEN     DarkGreen
+#define LCD_COLOR_DARKRED       RGB(0x80, 0x0, 0x0)
+#define LCD_COLOR_DARKCYAN      DarkCyan
+//#define LCD_COLOR_DARKMAGENTA   0xFF800080
+//#define LCD_COLOR_DARKYELLOW    0xFF808000
+#define LCD_COLOR_WHITE         White
+#define LCD_COLOR_LIGHTGRAY     LightGrey
+//#define LCD_COLOR_GRAY          0xFF808080
+#define LCD_COLOR_DARKGRAY      DarkGrey
+#define LCD_COLOR_BLACK         Black
+//#define LCD_COLOR_BROWN         0xFFA52A2A
+#define LCD_COLOR_ORANGE        Orange
+#define LCD_COLOR_TRANSPARENT   0xFF000000
+
 #define FONT_OFFSET_INDEX 0
 #define FONT_WIDTH_INDEX 1
 #define FONT_HEIGHT_INDEX 2
 #define FONT_BSP_INDEX 3
 
+/**
+  * @brief  Line mode structures definition
+  */
+enum Text_AlignModeTypdef
+{
+  CENTER_MODE             = 0x01,    /* center mode */
+  RIGHT_MODE              = 0x02,    /* right mode  */
+  LEFT_MODE               = 0x03,    /* left mode   */
+};
+
 /** Display control class, based on GraphicsDisplay and TextDisplay
  *
  * Example:
@@ -287,7 +324,7 @@
      * @param row
      * @param column
      */
-    void locateChar(uint16_t row, uint16_t column);
+    void locateChar(uint16_t row, uint16_t column, Text_AlignModeTypdef mode = LEFT_MODE, uint16_t textLength = 1);
 
     /** Calculates character's left coordinate in pixels.
      *
@@ -321,6 +358,8 @@
      */
     uint16_t getCharRight(uint16_t column);
 
+    void ClearStringLine(uint16_t row);
+
     DigitalOut _cs;
     DigitalOut _reset;
     DigitalOut _dc;
@@ -452,4 +491,3 @@
 };
 
 #endif
-