acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

ILI9163_Defines.h (2153B)

      1 // Change the width and height if required (defined in portrait mode)
      2 // or use the constructor to over-ride defaults
      3 #ifndef TFT_WIDTH
      4   #define TFT_WIDTH  128
      5 #endif
      6 #ifndef TFT_HEIGHT
      7   #define TFT_HEIGHT 160
      8 #endif
      9 
     10 #if (TFT_HEIGHT == 128) && (TFT_WIDTH == 128)
     11   #define CGRAM_OFFSET
     12 #endif
     13 
     14 // Color definitions for backwards compatibility with old sketches
     15 // use colour definitions like TFT_BLACK to make sketches more portable
     16 #define ILI9163_BLACK       0x0000      /*   0,   0,   0 */
     17 #define ILI9163_NAVY        0x000F      /*   0,   0, 128 */
     18 #define ILI9163_DARKGREEN   0x03E0      /*   0, 128,   0 */
     19 #define ILI9163_DARKCYAN    0x03EF      /*   0, 128, 128 */
     20 #define ILI9163_MAROON      0x7800      /* 128,   0,   0 */
     21 #define ILI9163_PURPLE      0x780F      /* 128,   0, 128 */
     22 #define ILI9163_OLIVE       0x7BE0      /* 128, 128,   0 */
     23 #define ILI9163_LIGHTGREY   0xC618      /* 192, 192, 192 */
     24 #define ILI9163_DARKGREY    0x7BEF      /* 128, 128, 128 */
     25 #define ILI9163_BLUE        0x001F      /*   0,   0, 255 */
     26 #define ILI9163_GREEN       0x07E0      /*   0, 255,   0 */
     27 #define ILI9163_CYAN        0x07FF      /*   0, 255, 255 */
     28 #define ILI9163_RED         0xF800      /* 255,   0,   0 */
     29 #define ILI9163_MAGENTA     0xF81F      /* 255,   0, 255 */
     30 #define ILI9163_YELLOW      0xFFE0      /* 255, 255,   0 */
     31 #define ILI9163_WHITE       0xFFFF      /* 255, 255, 255 */
     32 #define ILI9163_ORANGE      0xFD20      /* 255, 165,   0 */
     33 #define ILI9163_GREENYELLOW 0xAFE5      /* 173, 255,  47 */
     34 #define ILI9163_PINK        0xF81F
     35 
     36 
     37 // Delay between some initialisation commands
     38 #define TFT_INIT_DELAY 0x80
     39 
     40 
     41 // Generic commands used by TFT_eSPI.cpp
     42 #define TFT_NOP     0x00
     43 #define TFT_SWRST   0x01
     44 
     45 #define TFT_CASET   0x2A
     46 #define TFT_PASET   0x2B
     47 #define TFT_RAMWR   0x2C
     48 
     49 #define TFT_RAMRD   0x2E
     50 #define TFT_IDXRD   0x00 //0xDD // ILI9341 only, indexed control register read
     51 
     52 #define TFT_MADCTL  0x36
     53 #define TFT_MAD_MY  0x80
     54 #define TFT_MAD_MX  0x40
     55 #define TFT_MAD_MV  0x20
     56 #define TFT_MAD_ML  0x10
     57 #define TFT_MAD_BGR 0x08
     58 #define TFT_MAD_MH  0x04
     59 #define TFT_MAD_RGB 0x00
     60 
     61 #define TFT_INVOFF  0x20
     62 #define TFT_INVON   0x21