ESPHome  2024.11.0
ili9xxx_init.h
Go to the documentation of this file.
1 #pragma once
2 #include "esphome/core/helpers.h"
3 
4 #include <cinttypes>
5 
6 namespace esphome {
7 namespace ili9xxx {
8 
9 // clang-format off
10 static const uint8_t PROGMEM INITCMD_M5STACK[] = {
11  0xEF, 3, 0x03, 0x80, 0x02,
12  0xCF, 3, 0x00, 0xC1, 0x30,
13  0xED, 4, 0x64, 0x03, 0x12, 0x81,
14  0xE8, 3, 0x85, 0x00, 0x78,
15  0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02,
16  0xF7, 1, 0x20,
17  0xEA, 2, 0x00, 0x00,
18  ILI9XXX_PWCTR1 , 1, 0x23, // Power control VRH[5:0]
19  ILI9XXX_PWCTR2 , 1, 0x10, // Power control SAP[2:0];BT[3:0]
20  ILI9XXX_VMCTR1 , 2, 0x3e, 0x28, // VCM control
21  ILI9XXX_VMCTR2 , 1, 0x86, // VCM control2
22  ILI9XXX_MADCTL , 1, MADCTL_BGR, // Memory Access Control
23  ILI9XXX_VSCRSADD, 1, 0x00, // Vertical scroll zero
24  ILI9XXX_PIXFMT , 1, 0x55,
25  ILI9XXX_FRMCTR1 , 2, 0x00, 0x13,
26  ILI9XXX_DFUNCTR , 3, 0x08, 0x82, 0x27, // Display Function Control
27  0xF2, 1, 0x00, // 3Gamma Function Disable
28  ILI9XXX_GAMMASET , 1, 0x01, // Gamma curve selected
29  ILI9XXX_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma
30  0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03,
31  0x0E, 0x09, 0x00,
32  ILI9XXX_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma
33  0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C,
34  0x31, 0x36, 0x0F,
35  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
36  ILI9XXX_DISPON , 0x80, // Display on
37  0x00 // End of list
38 };
39 
40 static const uint8_t PROGMEM INITCMD_M5CORE[] = {
41  ILI9XXX_SETEXTC, 3, 0xFF,0x93,0x42, // Turn on the external command
42  ILI9XXX_PWCTR1 , 2, 0x12, 0x12,
43  ILI9XXX_PWCTR2 , 1, 0x03,
44  ILI9XXX_VMCTR1 , 1, 0xF2,
45  ILI9XXX_IFMODE , 1, 0xE0,
46  0xF6 , 3, 0x01, 0x00, 0x00,
47  ILI9XXX_GMCTRP1,15, 0x00,0x0C,0x11,0x04,0x11,0x08,0x37,0x89,0x4C,0x06,0x0C,0x0A,0x2E,0x34,0x0F,
48  ILI9XXX_GMCTRN1,15, 0x00,0x0B,0x11,0x05,0x13,0x09,0x33,0x67,0x48,0x07,0x0E,0x0B,0x2E,0x33,0x0F,
49  ILI9XXX_DFUNCTR, 4, 0x08,0x82,0x1D,0x04,
50  ILI9XXX_IDMOFF , 0,
51  ILI9XXX_DISPON , 0x80, // Display on
52  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
53 
54  0x00 // End of list
55 };
56 
57 
58 
59 static const uint8_t PROGMEM INITCMD_ILI9341[] = {
60  0xEF, 3, 0x03, 0x80, 0x02,
61  0xCF, 3, 0x00, 0xC1, 0x30,
62  0xED, 4, 0x64, 0x03, 0x12, 0x81,
63  0xE8, 3, 0x85, 0x00, 0x78,
64  0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02,
65  0xF7, 1, 0x20,
66  0xEA, 2, 0x00, 0x00,
67  ILI9XXX_PWCTR1 , 1, 0x23, // Power control VRH[5:0]
68  ILI9XXX_PWCTR2 , 1, 0x10, // Power control SAP[2:0];BT[3:0]
69  ILI9XXX_VMCTR1 , 2, 0x3e, 0x28, // VCM control
70  ILI9XXX_VMCTR2 , 1, 0x86, // VCM control2
71  ILI9XXX_MADCTL , 1, 0x48, // Memory Access Control
72  ILI9XXX_VSCRSADD, 1, 0x00, // Vertical scroll zero
73  ILI9XXX_PIXFMT , 1, 0x55,
74  ILI9XXX_FRMCTR1 , 2, 0x00, 0x18,
75  ILI9XXX_DFUNCTR , 3, 0x08, 0x82, 0x27, // Display Function Control
76  0xF2, 1, 0x00, // 3Gamma Function Disable
77  ILI9XXX_GAMMASET , 1, 0x01, // Gamma curve selected
78  ILI9XXX_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma
79  0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03,
80  0x0E, 0x09, 0x00,
81  ILI9XXX_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma
82  0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C,
83  0x31, 0x36, 0x0F,
84  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
85  ILI9XXX_DISPON , 0x80, // Display on
86  0x00 // End of list
87 };
88 
89 static const uint8_t PROGMEM INITCMD_ILI9481[] = {
90  ILI9XXX_SLPOUT , 0x80, // Exit sleep mode
91  ILI9XXX_PWSET , 3, 0x07, 0x41, 0x1D,
92  ILI9XXX_VMCTR , 3, 0x00, 0x1C, 0x1F,
93  ILI9XXX_PWSETN , 2, 0x01, 0x11,
94  ILI9XXX_PWCTR1 , 5, 0x10, 0x3B, 0x00, 0x02, 0x11,
95  ILI9XXX_VMCTR1 , 1, 0x03,
96  ILI9XXX_IFCTR , 1, 0x83,
97  ILI9XXX_GMCTR ,12, 0x00, 0x26, 0x21, 0x00, 0x00, 0x1F, 0x65, 0x23, 0x77, 0x00, 0x0F, 0x00,
98  ILI9XXX_IFMODE , 1, 0x00, // CommandAccessProtect
99  ILI9XXX_PTLAR , 4, 0, 0, 1, 0xDF,
100  0xE4 , 1, 0xA0,
101  ILI9XXX_MADCTL , 1, MADCTL_MV | MADCTL_BGR, // Memory Access Control
102  ILI9XXX_CSCON , 1, 0x01,
103  ILI9XXX_PIXFMT, 1, 0x55, // 16 bit mode
104  ILI9XXX_DISPON, 0x80, // Set display on
105  0x00 // end
106 };
107 
108 static const uint8_t PROGMEM INITCMD_ILI9481_18[] = {
109  ILI9XXX_SLPOUT , 0x80, // Exit sleep mode
110  ILI9XXX_PWSET , 3, 0x07, 0x41, 0x1D,
111  ILI9XXX_VMCTR , 3, 0x00, 0x1C, 0x1F,
112  ILI9XXX_PWSETN , 2, 0x01, 0x11,
113  ILI9XXX_PWCTR1 , 5, 0x10, 0x3B, 0x00, 0x02, 0x11,
114  ILI9XXX_VMCTR1 , 1, 0x03,
115  ILI9XXX_IFCTR , 1, 0x83,
116  ILI9XXX_GMCTR ,12, 0x00, 0x26, 0x21, 0x00, 0x00, 0x1F, 0x65, 0x23, 0x77, 0x00, 0x0F, 0x00,
117  ILI9XXX_IFMODE , 1, 0x00, // CommandAccessProtect
118  ILI9XXX_PTLAR , 4, 0, 0, 1, 0xDF,
119  0xE4 , 1, 0xA0,
120  ILI9XXX_MADCTL , 1, MADCTL_MX| MADCTL_BGR, // Memory Access Control
121  ILI9XXX_CSCON , 1, 0x01,
122  ILI9XXX_PIXFMT, 1, 0x66, // 18 bit mode
123  ILI9XXX_DISPON, 0x80, // Set display on
124  0x00 // end
125 };
126 
127 static const uint8_t PROGMEM INITCMD_ILI9486[] = {
128  ILI9XXX_SLPOUT, 0x80,
129  ILI9XXX_PIXFMT, 1, 0x55,
130  ILI9XXX_PWCTR3, 1, 0x44,
131  ILI9XXX_VMCTR1, 4, 0x00, 0x00, 0x00, 0x00,
132  ILI9XXX_GMCTRP1, 15, 0x0f,0x1f,0x1c,0x0c,0x0f,0x08,0x48,0x98,0x37,0x0a,0x13,0x04,0x11,0x0d,0x00,
133  ILI9XXX_GMCTRN1, 15, 0x0f,0x32,0x2e,0x0b,0x0d,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,
134  ILI9XXX_INVOFF, 0x80,
135  ILI9XXX_MADCTL, 1, 0x48,
136  ILI9XXX_DISPON, 0x80,
137 
138  // ILI9XXX_MADCTL, 1, MADCTL_BGR | MADCTL_MV, //hardware rotation
139  0x00 // End of list
140 };
141 
142 
143 static const uint8_t INITCMD_ILI9488[] = {
144  ILI9XXX_GMCTRP1,15, 0x0f, 0x24, 0x1c, 0x0a, 0x0f, 0x08, 0x43, 0x88, 0x32, 0x0f, 0x10, 0x06, 0x0f, 0x07, 0x00,
145  ILI9XXX_GMCTRN1,15, 0x0F, 0x38, 0x30, 0x09, 0x0f, 0x0f, 0x4e, 0x77, 0x3c, 0x07, 0x10, 0x05, 0x23, 0x1b, 0x00,
146 
147  ILI9XXX_PWCTR1, 2, 0x17, 0x15, // VRH1 VRH2
148  ILI9XXX_PWCTR2, 1, 0x41, // VGH, VGL
149  ILI9XXX_VMCTR1, 3, 0x00, 0x12, 0x80, // nVM VCM_REG VCM_REG_EN
150 
151  ILI9XXX_IFMODE, 1, 0x00,
152  ILI9XXX_FRMCTR1, 1, 0xA0, // Frame rate = 60Hz
153  ILI9XXX_INVCTR, 1, 0x02, // Display Inversion Control = 2dot
154 
155  0xE9, 1, 0x00, // Set Image Functio. Disable 24 bit data
156 
157  ILI9XXX_ADJCTL3, 4, 0xA9, 0x51, 0x2C, 0x82, // Adjust Control 3
158  ILI9XXX_PIXFMT, 1, 0x66, //ILI9488 only supports 18-bit pixel format in 4/3 wire SPI mode
159  ILI9XXX_SLPOUT, 0x80, // Exit sleep mode
160  ILI9XXX_DISPON, 0x80, // Set display on
161  0x00 // end
162 };
163 
164 static const uint8_t INITCMD_WAVESHARE_RES_3_5[] = {
165  ILI9XXX_PWCTR3, 1, 0x33,
166  ILI9XXX_VMCTR1, 3, 0x00, 0x1e, 0x80,
167  ILI9XXX_FRMCTR1, 1, 0xA0,
168  ILI9XXX_GMCTRP1, 15, 0x0, 0x13, 0x18, 0x04, 0x0F, 0x06, 0x3a, 0x56, 0x4d, 0x03, 0x0a, 0x06, 0x30, 0x3e, 0x0f,
169  ILI9XXX_GMCTRN1, 15, 0x0, 0x13, 0x18, 0x01, 0x11, 0x06, 0x38, 0x34, 0x4d, 0x06, 0x0d, 0x0b, 0x31, 0x37, 0x0f,
170  ILI9XXX_PIXFMT, 1, 0x55,
171  ILI9XXX_SLPOUT, 0x80, // slpout, delay
172  ILI9XXX_DISPON, 0,
173  0x00 // End of list
174 };
175 
176 static const uint8_t PROGMEM INITCMD_ILI9488_A[] = {
177  ILI9XXX_GMCTRP1,15, 0x00, 0x03, 0x09, 0x08, 0x16, 0x0A, 0x3F, 0x78, 0x4C, 0x09, 0x0A, 0x08, 0x16, 0x1A, 0x0F,
178  ILI9XXX_GMCTRN1,15, 0x00, 0x16, 0x19, 0x03, 0x0F, 0x05, 0x32, 0x45, 0x46, 0x04, 0x0E, 0x0D, 0x35, 0x37, 0x0F,
179 
180  ILI9XXX_PWCTR1, 2, 0x17, 0x15, // VRH1 VRH2
181  ILI9XXX_PWCTR2, 1, 0x41, // VGH, VGL
182  ILI9XXX_VMCTR1, 3, 0x00, 0x12, 0x80, // nVM VCM_REG VCM_REG_EN
183 
184  ILI9XXX_IFMODE, 1, 0x00,
185  ILI9XXX_FRMCTR1, 1, 0xA0, // Frame rate = 60Hz
186  ILI9XXX_INVCTR, 1, 0x02, // Display Inversion Control = 2dot
187 
188  ILI9XXX_DFUNCTR, 2, 0x02, 0x02, // Nomal scan
189 
190  0xE9, 1, 0x00, // Set Image Functio. Disable 24 bit data
191 
192  ILI9XXX_ADJCTL3, 4, 0xA9, 0x51, 0x2C, 0x82, // Adjust Control 3
193 
194  ILI9XXX_MADCTL, 1, 0x28,
195  //ILI9XXX_PIXFMT, 1, 0x55, // Interface Pixel Format = 16bit
196  ILI9XXX_PIXFMT, 1, 0x66, //ILI9488 only supports 18-bit pixel format in 4/3 wire SPI mode
197 
198 
199 
200  // 5 frames
201  //ILI9XXX_ETMOD, 1, 0xC6, //
202 
203 
204  ILI9XXX_SLPOUT, 0x80, // Exit sleep mode
205  ILI9XXX_DISPON, 0x80, // Set display on
206  0x00 // end
207 };
208 
209 static const uint8_t PROGMEM INITCMD_ST7796[] = {
210  // This ST7796S initilization routine was copied from https://github.com/prenticedavid/Adafruit_ST7796S_kbv/blob/master/Adafruit_ST7796S_kbv.cpp
211  ILI9XXX_SWRESET, 0x80, // Soft reset, then delay 150 ms
212  ILI9XXX_CSCON, 1, 0xC3, // ?? Unlock Manufacturer
213  ILI9XXX_CSCON, 1, 0x96,
214  ILI9XXX_VMCTR1, 1, 0x1C, //VCOM Control 1 [1C]
215  ILI9XXX_MADCTL, 1, 0x48, //Memory Access [00]
216  ILI9XXX_PIXFMT, 1, 0x55, //565
217  ILI9XXX_IFMODE, 1, 0x80, //Interface [00]
218  ILI9XXX_INVCTR, 1, 0x01, //Inversion Control [01]
219  ILI9XXX_DFUNCTR, 3, 0x80, 0x02, 0x3B, // Display Function Control [80 02 3B] .kbv SS=1, NL=480
220  ILI9XXX_ETMOD, 1, 0xC6, //Entry Mode [06]
221 
222  ILI9XXX_CSCON, 1, 0x69, //?? lock manufacturer commands
223  ILI9XXX_CSCON, 1, 0x3C, //
224  ILI9XXX_SLPOUT, 0x80, // Exit Sleep, then delay 150 ms
225  ILI9XXX_DISPON, 0x80, // Main screen turn on, delay 150 ms
226  0x00 // End of list
227 };
228 
229 static const uint8_t PROGMEM INITCMD_S3BOX[] = {
230  0xEF, 3, 0x03, 0x80, 0x02,
231  0xCF, 3, 0x00, 0xC1, 0x30,
232  0xED, 4, 0x64, 0x03, 0x12, 0x81,
233  0xE8, 3, 0x85, 0x00, 0x78,
234  0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02,
235  0xF7, 1, 0x20,
236  0xEA, 2, 0x00, 0x00,
237  ILI9XXX_PWCTR1 , 1, 0x23, // Power control VRH[5:0]
238  ILI9XXX_PWCTR2 , 1, 0x10, // Power control SAP[2:0];BT[3:0]
239  ILI9XXX_VMCTR1 , 2, 0x3e, 0x28, // VCM control
240  ILI9XXX_VMCTR2 , 1, 0x86, // VCM control2
241  ILI9XXX_MADCTL , 1, 0xC8, // Memory Access Control
242  ILI9XXX_VSCRSADD, 1, 0x00, // Vertical scroll zero
243  ILI9XXX_PIXFMT , 1, 0x55,
244  ILI9XXX_FRMCTR1 , 2, 0x00, 0x18,
245  ILI9XXX_DFUNCTR , 3, 0x08, 0x82, 0x27, // Display Function Control
246  0xF2, 1, 0x00, // 3Gamma Function Disable
247  ILI9XXX_GAMMASET , 1, 0x01, // Gamma curve selected
248  ILI9XXX_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma
249  0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03,
250  0x0E, 0x09, 0x00,
251  ILI9XXX_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma
252  0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C,
253  0x31, 0x36, 0x0F,
254  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
255  ILI9XXX_DISPON , 0x80, // Display on
256  0x00 // End of list
257 };
258 
259 static const uint8_t PROGMEM INITCMD_S3BOXLITE[] = {
260  0xEF, 3, 0x03, 0x80, 0x02,
261  0xCF, 3, 0x00, 0xC1, 0x30,
262  0xED, 4, 0x64, 0x03, 0x12, 0x81,
263  0xE8, 3, 0x85, 0x00, 0x78,
264  0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02,
265  0xF7, 1, 0x20,
266  0xEA, 2, 0x00, 0x00,
267  ILI9XXX_PWCTR1 , 1, 0x23, // Power control VRH[5:0]
268  ILI9XXX_PWCTR2 , 1, 0x10, // Power control SAP[2:0];BT[3:0]
269  ILI9XXX_VMCTR1 , 2, 0x3e, 0x28, // VCM control
270  ILI9XXX_VMCTR2 , 1, 0x86, // VCM control2
271  ILI9XXX_MADCTL , 1, 0x40, // Memory Access Control
272  ILI9XXX_VSCRSADD, 1, 0x00, // Vertical scroll zero
273  ILI9XXX_PIXFMT , 1, 0x55,
274  ILI9XXX_FRMCTR1 , 2, 0x00, 0x18,
275  ILI9XXX_DFUNCTR , 3, 0x08, 0x82, 0x27, // Display Function Control
276  0xF2, 1, 0x00, // 3Gamma Function Disable
277  ILI9XXX_GAMMASET , 1, 0x01, // Gamma curve selected
278  ILI9XXX_GMCTRP1 , 14, 0xF0, 0x09, 0x0B, 0x06, 0x04, 0x15, // Set Gamma
279  0x2F, 0x54, 0x42, 0x3C, 0x17, 0x14,
280  0x18, 0x1B,
281  ILI9XXX_GMCTRN1 , 14, 0xE0, 0x09, 0x0B, 0x06, 0x04, 0x03, // Set Gamma
282  0x2B, 0x43, 0x42, 0x3B, 0x16, 0x14,
283  0x17, 0x1B,
284  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
285  ILI9XXX_DISPON , 0x80, // Display on
286  0x00 // End of list
287 };
288 
289 static const uint8_t PROGMEM INITCMD_ST7789V[] = {
290  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
291  ILI9XXX_DISPON , 0x80, // Display on
292  ILI9XXX_MADCTL , 1, 0x08, // Memory Access Control, BGR
293  ILI9XXX_DFUNCTR, 2, 0x0A, 0x82,
294  ILI9XXX_PIXFMT , 1, 0x55,
295  ILI9XXX_FRMCTR2, 5, 0x0C, 0x0C, 0x00, 0x33, 0x33,
296  ILI9XXX_ETMOD, 1, 0x35, 0xBB, 1, 0x28,
297  ILI9XXX_PWCTR1 , 1, 0x0C, // Power control VRH[5:0]
298  ILI9XXX_PWCTR3 , 2, 0x01, 0xFF,
299  ILI9XXX_PWCTR4 , 1, 0x10,
300  ILI9XXX_PWCTR5 , 1, 0x20,
301  ILI9XXX_IFCTR , 1, 0x0F,
302  ILI9XXX_PWSET, 2, 0xA4, 0xA1,
303  ILI9XXX_GMCTRP1 , 14,
304  0xd0, 0x00, 0x02, 0x07, 0x0a,
305  0x28, 0x32, 0x44, 0x42, 0x06, 0x0e,
306  0x12, 0x14, 0x17,
307  ILI9XXX_GMCTRN1 , 14,
308  0xd0, 0x00, 0x02, 0x07, 0x0a,
309  0x28, 0x31, 0x54, 0x47,
310  0x0e, 0x1c, 0x17, 0x1b,
311  0x1e,
312  ILI9XXX_DISPON , 0x80, // Display on
313  0x00 // End of list
314 };
315 
316 static const uint8_t PROGMEM INITCMD_GC9A01A[] = {
317  0xEF, 0,
318  0xEB, 1, 0x14, // ?
319  0xFE, 0,
320  0xEF, 0,
321  0xEB, 1, 0x14, // ?
322  0x84, 1, 0x40, // ?
323  0x85, 1, 0xFF, // ?
324  0x86, 1, 0xFF, // ?
325  0x87, 1, 0xFF, // ?
326  0x88, 1, 0x0A, // ?
327  0x89, 1, 0x21, // ?
328  0x8A, 1, 0x00, // ?
329  0x8B, 1, 0x80, // ?
330  0x8C, 1, 0x01, // ?
331  0x8D, 1, 0x01, // ?
332  0x8E, 1, 0xFF, // ?
333  0x8F, 1, 0xFF, // ?
334  0xB6, 2, 0x00, 0x00, // ?
335  0x90, 4, 0x08, 0x08, 0x08, 0x08, // ?
336  ILI9XXX_PIXFMT , 1, 0x05,
337  ILI9XXX_MADCTL , 1, MADCTL_MX| MADCTL_BGR, // Memory Access Control
338  0xBD, 1, 0x06, // ?
339  0xBC, 1, 0x00, // ?
340  0xFF, 3, 0x60, 0x01, 0x04, // ?
341  0xC3, 1, 0x13,
342  0xC4, 1, 0x13,
343  0xF9, 1, 0x22,
344  0xBE, 1, 0x11, // ?
345  0xE1, 2, 0x10, 0x0E, // ?
346  0xDF, 3, 0x21, 0x0c, 0x02, // ?
347  0xF0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
348  0xF1, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
349  0xF2, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
350  0xF3, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
351  0xED, 2, 0x1B, 0x0B, // ?
352  0xAE, 1, 0x77, // ?
353  0xCD, 1, 0x63, // ?
354  0xE8, 1, 0x34,
355  0x62, 12, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70, // ?
356  0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70,
357  0x63, 12, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70, // ?
358  0x18, 0x13, 0x71, 0xF3, 0x70, 0x70,
359  0x64, 7, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07, // ?
360  0x66, 10, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00, // ?
361  0x67, 10, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98, // ?
362  0x74, 7, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00, // ?
363  0x98, 2, 0x3e, 0x07, // ?
364  0x35, 0,
365  ILI9XXX_SLPOUT , 0x80, // Exit Sleep
366  ILI9XXX_DISPON , 0x80, // Display on
367  0x00 // End of list
368 };
369 
370 static const uint8_t PROGMEM INITCMD_ST7735[] = {
371  ILI9XXX_SWRESET, 0, // Soft reset, then delay 10ms
372  ILI9XXX_DELAY(10),
373  ILI9XXX_SLPOUT , 0, // Exit Sleep, delay
374  ILI9XXX_DELAY(10),
375  ILI9XXX_PIXFMT , 1, 0x05,
376  ILI9XXX_FRMCTR1, 3, // 4: Frame rate control, 3 args + delay:
377  0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D)
378  ILI9XXX_FRMCTR2, 3, // 4: Framerate ctrl - idle mode, 3 args:
379  0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D)
380  ILI9XXX_FRMCTR3, 6, // 5: Framerate - partial mode, 6 args:
381  0x01, 0x2C, 0x2D, // Dot inversion mode
382  0x01, 0x2C, 0x2D, // Line inversion mode
383 
384  ILI9XXX_INVCTR, 1, // 7: Display inversion control, 1 arg:
385  0x7, // Line inversion
386  ILI9XXX_PWCTR1, 3, // 7: Power control, 3 args, no delay:
387  0xA2,
388  0x02, // -4.6V
389  0x84, // AUTO mode
390  ILI9XXX_PWCTR2, 1, // 8: Power control, 1 arg, no delay:
391  0xC5, // VGH25=2.4C VGSEL=-10 VGH=3 * AVDD
392  ILI9XXX_PWCTR3, 2, // 9: Power control, 2 args, no delay:
393  0x0A, // Opamp current small
394  0x00, // Boost frequency
395  ILI9XXX_PWCTR4, 2, // 10: Power control, 2 args, no delay:
396  0x8A, // BCLK/2,
397  0x2A, // opamp current small & medium low
398  ILI9XXX_PWCTR5, 2, // 11: Power control, 2 args, no delay:
399  0x8A, 0xEE,
400 
401  ILI9XXX_VMCTR1, 1, // 11: Power control, 2 args + delay:
402  0x0E,
403  ILI9XXX_GMCTRP1, 16, // 13: Gamma Adjustments (pos. polarity), 16 args + delay:
404  0x02, 0x1c, 0x07, 0x12, // (Not entirely necessary, but provides
405  0x37, 0x32, 0x29, 0x2d, // accurate colors)
406  0x29, 0x25, 0x2B, 0x39,
407  0x00, 0x01, 0x03, 0x10,
408  ILI9XXX_GMCTRN1, 16, // 14: Gamma Adjustments (neg. polarity), 16 args + delay:
409  0x03, 0x1d, 0x07, 0x06, // (Not entirely necessary, but provides
410  0x2E, 0x2C, 0x29, 0x2D, // accurate colors)
411  0x2E, 0x2E, 0x37, 0x3F,
412  0x00, 0x00, 0x02, 0x10,
413  ILI9XXX_MADCTL , 1, 0x00, // Memory Access Control, BGR
414  ILI9XXX_NORON , 0,
415  ILI9XXX_DELAY(10),
416  ILI9XXX_DISPON , 0, // Display on
417  ILI9XXX_DELAY(10),
418  00, // endo of list
419 };
420 
421 // clang-format on
422 } // namespace ili9xxx
423 } // namespace esphome
const uint8_t ESPHOME_WEBSERVER_INDEX_HTML [] PROGMEM
Definition: web_server.h:25
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7