@@ -59,6 +59,7 @@ template <class I> void InterfaceIL9163<I>::startBlock(lcduint_t x, lcduint_t y,
59
59
60
60
template <class I > void InterfaceIL9163<I>::nextBlock()
61
61
{
62
+
62
63
}
63
64
64
65
template <class I > void InterfaceIL9163<I>::endBlock()
@@ -117,6 +118,7 @@ template <class I> void InterfaceIL9163<I>::setRotation(uint8_t rotation)
117
118
this ->stop ();
118
119
}
119
120
121
+
120
122
// //////////////////////////////////////////////////////////////////////////////
121
123
// IL9163 basic 16-bit implementation
122
124
// //////////////////////////////////////////////////////////////////////////////
@@ -131,54 +133,34 @@ template <class I> void DisplayIL9163x16<I>::end()
131
133
132
134
static const PROGMEM uint8_t s_IL9163_lcd128x128x16_initData[] = {
133
135
#ifdef SDL_EMULATION
134
- SDL_LCD_IL9163,
135
- 0x00 ,
136
- 0x00 ,
137
- 0x00 ,
136
+ SDL_LCD_IL9163, 0x00 ,
137
+ 0x00 , 0x00 ,
138
138
#endif
139
- // 0x01, 0x00, // sw reset. not needed, we do hardware reset
140
- 0x11 ,
141
- 0x00 , // exit sleep mode
142
- 0x3A ,
143
- 0x01 ,
144
- 0x05 , // set 16-bit pixel format
145
- 0x26 ,
146
- 0x01 ,
147
- 0x04 , // set gamma curve: valid values 1, 2, 4, 8
148
- // 0xF2, 0x01, 0x01, // enable gamma adjustment, 0 - to disable
149
- // 0xE0, 15, 0x3F, 0x25, 0x1C,
150
- // 0x1E, 0x20, 0x12,
151
- // 0x2A, 0x90, 0x24,
152
- // 0x11, 0x00, 0x00,
153
- // 0x00, 0x00, 0x00, // positive gamma correction
154
- // 0xE1, 15, 0x20, 0x20, 0x20,
155
- // 0x20, 0x05, 0x00,
156
- // 0x15, 0xA7, 0x3D,
157
- // 0x18, 0x25, 0x2A,
158
- // 0x2B, 0x2B, 0x3A, // negative gamma correction
159
- // 0xB1, 0x02, 0x08, 0x08, // frame rate control 1, use by default
160
- // 0xB4, 0x01, 0x07, // display inversion, use by default
161
- 0xC0 ,
162
- 0x02 ,
163
- 0x0A ,
164
- 0x02 , // power control 1
165
- 0xC1 ,
166
- 0x01 ,
167
- 0x02 , // power control 2
168
- 0xC5 ,
169
- 0x02 ,
170
- 0x50 ,
171
- 0x5B , // vcom control 1
172
- 0xC7 ,
173
- 0x01 ,
174
- 0x40 , // vcom offset
175
- // 0x2A, 0x04, 0x00, 0x00, 0x00, 0x7F, // set column address, not needed.
176
- // 0x2B, 0x04, 0x00, 0x00, 0x00, 0x9F, // set page address, not needed.
177
- 0x36 ,
178
- 0x01 ,
179
- 0b00000000 , // Horizontal addressing mode
180
- 0x29 ,
181
- 0x00 ,
139
+ // 0x01, 0x00, // sw reset. not needed, we do hardware reset
140
+ 0x11 , 0x00 , // exit sleep mode
141
+ 0x3A , 0x01 , 0x05 , // set 16-bit pixel format
142
+ 0x26 , 0x01 , 0x04 , // set gamma curve: valid values 1, 2, 4, 8
143
+ // 0xF2, 0x01, 0x01, // enable gamma adjustment, 0 - to disable
144
+ // 0xE0, 15, 0x3F, 0x25, 0x1C,
145
+ // 0x1E, 0x20, 0x12,
146
+ // 0x2A, 0x90, 0x24,
147
+ // 0x11, 0x00, 0x00,
148
+ // 0x00, 0x00, 0x00, // positive gamma correction
149
+ // 0xE1, 15, 0x20, 0x20, 0x20,
150
+ // 0x20, 0x05, 0x00,
151
+ // 0x15, 0xA7, 0x3D,
152
+ // 0x18, 0x25, 0x2A,
153
+ // 0x2B, 0x2B, 0x3A, // negative gamma correction
154
+ // 0xB1, 0x02, 0x08, 0x08, // frame rate control 1, use by default
155
+ // 0xB4, 0x01, 0x07, // display inversion, use by default
156
+ 0xC0 , 0x02 , 0x0A , 0x02 , // power control 1
157
+ 0xC1 , 0x01 , 0x02 , // power control 2
158
+ 0xC5 , 0x02 , 0x50 , 0x5B , // vcom control 1
159
+ 0xC7 , 0x01 , 0x40 , // vcom offset
160
+ // 0x2A, 0x04, 0x00, 0x00, 0x00, 0x7F, // set column address, not needed.
161
+ // 0x2B, 0x04, 0x00, 0x00, 0x00, 0x9F, // set page address, not needed.
162
+ 0x36 , 0x01 , 0b00000000 , // Horizontal addressing mode
163
+ 0x29 , 0x00 ,
182
164
};
183
165
184
166
// //////////////////////////////////////////////////////////////////////////////
@@ -192,7 +174,10 @@ template <class I> void DisplayIL9163_128x128x16<I>::begin()
192
174
this ->m_h = 128 ;
193
175
// Give LCD some time to initialize. Refer to IL9163 datasheet
194
176
lcd_delay (120 );
195
- _configureSpiDisplay<I>(this ->m_intf , s_IL9163_lcd128x128x16_initData, sizeof (s_IL9163_lcd128x128x16_initData));
177
+ _configureSpiDisplay<I>(this ->m_intf ,
178
+ s_IL9163_lcd128x128x16_initData,
179
+ sizeof (s_IL9163_lcd128x128x16_initData));
180
+
196
181
}
197
182
198
183
template <class I > void DisplayIL9163_128x128x16<I>::end()
@@ -201,18 +186,20 @@ template <class I> void DisplayIL9163_128x128x16<I>::end()
201
186
202
187
static const PROGMEM uint8_t s_IL9163_lcd128x160x16_initData[] = {
203
188
#ifdef SDL_EMULATION
204
- SDL_LCD_IL9163, 0x00 , 0b00000011 , 0x00 ,
189
+ SDL_LCD_IL9163, 0x00 ,
190
+ 0b00000011 , 0x00 ,
205
191
#endif
206
- // 0x01, 0x00, // sw reset. not needed, we do hardware reset
207
- 0x11 , 0x00 , // exit sleep mode
208
- 0x3A , 0x01 , 0x05 , // set 16-bit pixel format
209
- 0x26 , 0x01 , 0x04 , // set gamma curve: valid values 1, 2, 4, 8
192
+ // 0x01, 0x00, // sw reset. not needed, we do hardware reset
193
+ 0x11 , 0x00 , // exit sleep mode
194
+ 0x3A , 0x01 , 0x05 , // set 16-bit pixel format
195
+ 0x26 , 0x01 , 0x04 , // set gamma curve: valid values 1, 2, 4, 8
210
196
0xC0 , 0x02 , 0x0A , 0x02 , // power control 1
211
- 0xC1 , 0x01 , 0x02 , // power control 2
197
+ 0xC1 , 0x01 , 0x02 , // power control 2
212
198
0xC5 , 0x02 , 0x50 , 0x5B , // vcom control 1
213
- 0xC7 , 0x01 , 0x40 , // vcom offset
214
- 0x36 , 0x01 , 0b00000000 , // Horizontal addressing mode
215
- 0x29 , 0x00 };
199
+ 0xC7 , 0x01 , 0x40 , // vcom offset
200
+ 0x36 , 0x01 , 0b00000000 , // Horizontal addressing mode
201
+ 0x29 , 0x00
202
+ };
216
203
217
204
// //////////////////////////////////////////////////////////////////////////////
218
205
// IL9163 basic 16-bit implementation
@@ -225,7 +212,10 @@ template <class I> void DisplayIL9163_128x160x16<I>::begin()
225
212
this ->m_h = 160 ;
226
213
// Give LCD some time to initialize. Refer to IL9163 datasheet
227
214
lcd_delay (120 );
228
- _configureSpiDisplay<I>(this ->m_intf , s_IL9163_lcd128x160x16_initData, sizeof (s_IL9163_lcd128x160x16_initData));
215
+ _configureSpiDisplay<I>(this ->m_intf ,
216
+ s_IL9163_lcd128x160x16_initData,
217
+ sizeof (s_IL9163_lcd128x160x16_initData));
218
+
229
219
}
230
220
231
221
template <class I > void DisplayIL9163_128x160x16<I>::end()
0 commit comments