acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
ST7796_Defines.h (2320B)
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 320 5 #endif 6 7 #ifndef TFT_HEIGHT 8 #define TFT_HEIGHT 480 9 #endif 10 11 // Generic commands used by TFT_eSPI.cpp 12 #define TFT_NOP 0x00 13 #define TFT_SWRST 0x01 14 15 #define TFT_CASET 0x2A 16 #define TFT_PASET 0x2B 17 #define TFT_RAMWR 0x2C 18 #define TFT_RAMRD 0x2E 19 20 #define TFT_MADCTL 0x36 21 #define TFT_MAD_MY 0x80 22 #define TFT_MAD_MX 0x40 23 #define TFT_MAD_MV 0x20 24 #define TFT_MAD_ML 0x10 25 #define TFT_MAD_BGR 0x08 26 #define TFT_MAD_MH 0x04 27 #define TFT_MAD_RGB 0x00 28 29 #ifdef TFT_RGB_ORDER 30 #if (TFT_RGB_ORDER == 1) 31 #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB 32 #else 33 #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR 34 #endif 35 #else 36 #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR 37 #endif 38 39 #define TFT_INVOFF 0x20 40 #define TFT_INVON 0x21 41 42 43 // ST7796 specific commands 44 #define ST7796_NOP 0x00 45 #define ST7796_SWRESET 0x01 46 #define ST7796_RDDID 0x04 47 #define ST7796_RDDST 0x09 48 49 #define ST7796_SLPIN 0x10 50 #define ST7796_SLPOUT 0x11 51 #define ST7796_PTLON 0x12 52 #define ST7796_NORON 0x13 53 54 #define ST7796_RDMODE 0x0A 55 #define ST7796_RDMADCTL 0x0B 56 #define ST7796_RDPIXFMT 0x0C 57 #define ST7796_RDIMGFMT 0x0A 58 #define ST7796_RDSELFDIAG 0x0F 59 60 #define ST7796_INVOFF 0x20 61 #define ST7796_INVON 0x21 62 63 #define ST7796_DISPOFF 0x28 64 #define ST7796_DISPON 0x29 65 66 #define ST7796_CASET 0x2A 67 #define ST7796_PASET 0x2B 68 #define ST7796_RAMWR 0x2C 69 #define ST7796_RAMRD 0x2E 70 71 #define ST7796_PTLAR 0x30 72 #define ST7796_VSCRDEF 0x33 73 #define ST7796_MADCTL 0x36 74 #define ST7796_VSCRSADD 0x37 75 #define ST7796_PIXFMT 0x3A 76 77 #define ST7796_WRDISBV 0x51 78 #define ST7796_RDDISBV 0x52 79 #define ST7796_WRCTRLD 0x53 80 81 #define ST7796_FRMCTR1 0xB1 82 #define ST7796_FRMCTR2 0xB2 83 #define ST7796_FRMCTR3 0xB3 84 #define ST7796_INVCTR 0xB4 85 #define ST7796_DFUNCTR 0xB6 86 87 #define ST7796_PWCTR1 0xC0 88 #define ST7796_PWCTR2 0xC1 89 #define ST7796_PWCTR3 0xC2 90 91 #define ST7796_VMCTR1 0xC5 92 #define ST7796_VMCOFF 0xC6 93 94 #define ST7796_RDID4 0xD3 95 96 #define ST7796_GMCTRP1 0xE0 97 #define ST7796_GMCTRN1 0xE1 98 99 #define ST7796_MADCTL_MY 0x80 100 #define ST7796_MADCTL_MX 0x40 101 #define ST7796_MADCTL_MV 0x20 102 #define ST7796_MADCTL_ML 0x10 103 #define ST7796_MADCTL_RGB 0x00 104 #define ST7796_MADCTL_BGR 0x08 105 #define ST7796_MADCTL_MH 0x04