acidportal

- 😈 Worlds smallest Evil Portal on a LilyGo T-QT
git clone git://git.acid.vegas/acidportal.git
Log | Files | Refs | Archive | README | LICENSE

HX8357D_Defines.h (2079B)

      1 // Change the width and height if required (defined in portrait mode)
      2 // or use the constructor to over-ride defaults
      3 #define TFT_WIDTH  320
      4 #define TFT_HEIGHT 480
      5 
      6 
      7 // Delay between some initialisation commands
      8 #define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked
      9 
     10 
     11 // Generic commands used by TFT_eSPar.cpp
     12 #define TFT_NOP     0x00
     13 #define TFT_SWRST   0x01
     14 
     15 #define TFT_SLPIN   0x10
     16 #define TFT_SLPOUT  0x11
     17 
     18 #define TFT_INVOFF  0x20
     19 #define TFT_INVON   0x21
     20 
     21 #define TFT_DISPOFF 0x28
     22 #define TFT_DISPON  0x29
     23 
     24 #define TFT_CASET   0x2A
     25 #define TFT_PASET   0x2B
     26 #define TFT_RAMWR   0x2C
     27 
     28 #define TFT_RAMRD   0x2E
     29 
     30 #define TFT_MADCTL  0x36
     31 
     32 #define TFT_MAD_MY  0x80
     33 #define TFT_MAD_MX  0x40
     34 #define TFT_MAD_MV  0x20
     35 #define TFT_MAD_ML  0x10
     36 #define TFT_MAD_RGB 0x00
     37 #define TFT_MAD_BGR 0x08
     38 #define TFT_MAD_MH  0x04
     39 #define TFT_MAD_SS  0x02
     40 #define TFT_MAD_GS  0x01
     41 
     42 #ifdef TFT_RGB_ORDER
     43   #if (TFT_RGB_ORDER == 1)
     44     #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB
     45   #else
     46     #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR
     47   #endif
     48 #else
     49   #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB
     50 #endif
     51 
     52 #define TFT_IDXRD   0x00 // ILI9341 only, indexed control register read
     53 
     54 
     55 #define HX8357_NOP     0x00
     56 #define HX8357_SWRESET 0x01
     57 #define HX8357_RDDID   0x04
     58 #define HX8357_RDDST   0x09
     59 
     60 #define HX8357_RDPOWMODE  0x0A
     61 #define HX8357_RDMADCTL  0x0B
     62 #define HX8357_RDCOLMOD  0x0C
     63 #define HX8357_RDDIM  0x0D
     64 #define HX8357_RDDSDR  0x0F
     65 
     66 #define HX8357_SLPIN   0x10
     67 #define HX8357_SLPOUT  0x11
     68 
     69 #define HX8357_INVOFF  0x20
     70 #define HX8357_INVON   0x21
     71 #define HX8357_DISPOFF 0x28
     72 #define HX8357_DISPON  0x29
     73 
     74 #define HX8357_CASET   0x2A
     75 #define HX8357_PASET   0x2B
     76 #define HX8357_RAMWR   0x2C
     77 #define HX8357_RAMRD   0x2E
     78 
     79 #define HX8357_TEON  0x35
     80 #define HX8357_TEARLINE  0x44
     81 #define HX8357_MADCTL  0x36
     82 #define HX8357_COLMOD  0x3A
     83 
     84 #define HX8357_SETOSC 0xB0
     85 #define HX8357_SETPWR1 0xB1
     86 #define HX8357_SETRGB 0xB3
     87 #define HX8357D_SETCOM  0xB6
     88 
     89 #define HX8357D_SETCYC  0xB4
     90 #define HX8357D_SETC 0xB9
     91 
     92 #define HX8357D_SETSTBA 0xC0
     93 
     94 #define HX8357_SETPANEL  0xCC
     95 
     96 #define HX8357D_SETGAMMA 0xE0