|
@@ -133,8 +133,8 @@ static const uint16_t st7796s_init[] = {
|
133
|
133
|
ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
|
134
|
134
|
|
135
|
135
|
/* Gamma Correction. */
|
136
|
|
- ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
|
137
|
|
- ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
|
|
136
|
+ ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
|
|
137
|
+ ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
|
138
|
138
|
|
139
|
139
|
ESC_REG(ST7796S_NORON),
|
140
|
140
|
ESC_REG(ST7796S_WRCTRLD), 0x0024,
|
|
@@ -146,30 +146,30 @@ static const uint16_t st7796s_init[] = {
|
146
|
146
|
|
147
|
147
|
static const uint16_t lerdge_st7796s_init[] = {
|
148
|
148
|
DATASIZE_8BIT,
|
149
|
|
- ESC_REG(ST7796S_CSCON), 0x00C3, // enable command 2 part I
|
150
|
|
- ESC_REG(ST7796S_CSCON), 0x0096, // enable command 2 part II
|
|
149
|
+ ESC_REG(ST7796S_CSCON), 0x00C3, // enable command 2 part I
|
|
150
|
+ ESC_REG(ST7796S_CSCON), 0x0096, // enable command 2 part II
|
151
|
151
|
|
152
|
|
- ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA,
|
|
152
|
+ ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA,
|
153
|
153
|
ESC_REG(ST7796S_COLMOD), 0x0055,
|
154
|
154
|
|
155
|
|
- ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion
|
156
|
|
- ESC_REG(ST7796S_EM), 0x00C6,
|
|
155
|
+ ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion
|
|
156
|
+ ESC_REG(ST7796S_EM), 0x00C6,
|
157
|
157
|
|
158
|
|
- ESC_REG(ST7796S_PWR2), 0x0015,
|
159
|
|
- ESC_REG(ST7796S_PWR3), 0x00AF,
|
160
|
|
- ESC_REG(0xC3), 0x0009, // Register not documented in datasheet
|
161
|
|
- ESC_REG(ST7796S_VCMPCTL), 0x0022,
|
162
|
|
- ESC_REG(ST7796S_VCMOST), 0x0000,
|
163
|
|
- ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
|
|
158
|
+ ESC_REG(ST7796S_PWR2), 0x0015,
|
|
159
|
+ ESC_REG(ST7796S_PWR3), 0x00AF,
|
|
160
|
+ ESC_REG(0xC3), 0x0009, // Register not documented in datasheet
|
|
161
|
+ ESC_REG(ST7796S_VCMPCTL), 0x0022,
|
|
162
|
+ ESC_REG(ST7796S_VCMOST), 0x0000,
|
|
163
|
+ ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033,
|
164
|
164
|
|
165
|
165
|
/* Gamma Correction. */
|
166
|
|
- ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
|
167
|
|
- ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
|
168
|
|
-
|
169
|
|
- ESC_REG(ST7796S_INVON), // Display inversion ON
|
170
|
|
- ESC_REG(ST7796S_WRCTRLD), 0x0024,
|
171
|
|
- ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I
|
172
|
|
- ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II
|
173
|
|
- ESC_REG(ST7796S_DISPON),
|
|
166
|
+ ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
|
|
167
|
+ ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
|
|
168
|
+
|
|
169
|
+ ESC_REG(ST7796S_INVON), // Display inversion ON
|
|
170
|
+ ESC_REG(ST7796S_WRCTRLD), 0x0024,
|
|
171
|
+ ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I
|
|
172
|
+ ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II
|
|
173
|
+ ESC_REG(ST7796S_DISPON),
|
174
|
174
|
ESC_END
|
175
|
175
|
};
|