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