|
@@ -267,51 +267,102 @@ static const uint8_t ili9341_init_sequence[] = { // 0x9341 - ILI9341
|
267
|
267
|
B01111111,B11111111,B11111111,B11111110,
|
268
|
268
|
};
|
269
|
269
|
|
270
|
|
- static const uint8_t buttonA[] = {
|
271
|
|
- B01111111,B11111111,B11111111,B11111110,
|
272
|
|
- B10000000,B00000000,B00000000,B00000001,
|
273
|
|
- B10000000,B00000000,B00000000,B00000001,
|
274
|
|
- B10000000,B00000000,B00000000,B00000001,
|
275
|
|
- B10000000,B00000000,B00000000,B00000001,
|
276
|
|
- B10000000,B01000000,B00000000,B00000001,
|
277
|
|
- B10000000,B11100000,B00000000,B00000001,
|
278
|
|
- B10000001,B11110000,B00000000,B00000001,
|
279
|
|
- B10000011,B11111000,B00000000,B00000001,
|
280
|
|
- B10000111,B11111100,B00111111,B11100001,
|
281
|
|
- B10000000,B11100000,B00111111,B11100001,
|
282
|
|
- B10000000,B11100000,B00000000,B00000001,
|
283
|
|
- B10000000,B11100000,B00000000,B00000001,
|
284
|
|
- B10000000,B11100000,B00000000,B00000001,
|
285
|
|
- B10000000,B11100000,B00000000,B00000001,
|
286
|
|
- B10000000,B00000000,B00000000,B00000001,
|
287
|
|
- B10000000,B00000000,B00000000,B00000001,
|
288
|
|
- B10000000,B00000000,B00000000,B00000001,
|
289
|
|
- B10000000,B00000000,B00000000,B00000001,
|
290
|
|
- B01111111,B11111111,B11111111,B11111110,
|
291
|
|
- };
|
|
270
|
+ #if ENABLED(REVERSE_MENU_DIRECTION)
|
|
271
|
+
|
|
272
|
+ static const uint8_t buttonA[] = {
|
|
273
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
274
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
275
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
276
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
277
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
278
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
279
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
280
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
281
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
282
|
+ B10000000,B11100000,B00111111,B11100001,
|
|
283
|
+ B10000111,B11111100,B00111111,B11100001,
|
|
284
|
+ B10000011,B11111000,B00000000,B00000001,
|
|
285
|
+ B10000001,B11110000,B00000000,B00000001,
|
|
286
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
287
|
+ B10000000,B01000000,B00000000,B00000001,
|
|
288
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
289
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
290
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
291
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
292
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
293
|
+ };
|
|
294
|
+ static const uint8_t buttonB[] = {
|
|
295
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
296
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
297
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
298
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
299
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
300
|
+ B10000000,B01100000,B00000010,B00000001,
|
|
301
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
302
|
+ B10000000,B01100000,B00001111,B10000001,
|
|
303
|
+ B10000000,B01100000,B00011111,B11000001,
|
|
304
|
+ B10000111,B11111110,B00111111,B11100001,
|
|
305
|
+ B10000111,B11111110,B00000111,B00000001,
|
|
306
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
307
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
308
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
309
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
310
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
311
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
312
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
313
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
314
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
315
|
+ };
|
292
|
316
|
|
293
|
|
- static const uint8_t buttonB[] = {
|
294
|
|
- B01111111,B11111111,B11111111,B11111110,
|
295
|
|
- B10000000,B00000000,B00000000,B00000001,
|
296
|
|
- B10000000,B00000000,B00000000,B00000001,
|
297
|
|
- B10000000,B00000000,B00000000,B00000001,
|
298
|
|
- B10000000,B00000000,B00000000,B00000001,
|
299
|
|
- B10000000,B01100000,B00000111,B00000001,
|
300
|
|
- B10000000,B01100000,B00000111,B00000001,
|
301
|
|
- B10000000,B01100000,B00000111,B00000001,
|
302
|
|
- B10000000,B01100000,B00000111,B00000001,
|
303
|
|
- B10000111,B11111110,B00000111,B00000001,
|
304
|
|
- B10000111,B11111110,B00111111,B11100001,
|
305
|
|
- B10000000,B01100000,B00011111,B11000001,
|
306
|
|
- B10000000,B01100000,B00001111,B10000001,
|
307
|
|
- B10000000,B01100000,B00000111,B00000001,
|
308
|
|
- B10000000,B01100000,B00000010,B00000001,
|
309
|
|
- B10000000,B00000000,B00000000,B00000001,
|
310
|
|
- B10000000,B00000000,B00000000,B00000001,
|
311
|
|
- B10000000,B00000000,B00000000,B00000001,
|
312
|
|
- B10000000,B00000000,B00000000,B00000001,
|
313
|
|
- B01111111,B11111111,B11111111,B11111110,
|
314
|
|
- };
|
|
317
|
+ #else
|
|
318
|
+
|
|
319
|
+ static const uint8_t buttonA[] = {
|
|
320
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
321
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
322
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
323
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
324
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
325
|
+ B10000000,B01000000,B00000000,B00000001,
|
|
326
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
327
|
+ B10000001,B11110000,B00000000,B00000001,
|
|
328
|
+ B10000011,B11111000,B00000000,B00000001,
|
|
329
|
+ B10000111,B11111100,B00111111,B11100001,
|
|
330
|
+ B10000000,B11100000,B00111111,B11100001,
|
|
331
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
332
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
333
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
334
|
+ B10000000,B11100000,B00000000,B00000001,
|
|
335
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
336
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
337
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
338
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
339
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
340
|
+ };
|
|
341
|
+
|
|
342
|
+ static const uint8_t buttonB[] = {
|
|
343
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
344
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
345
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
346
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
347
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
348
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
349
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
350
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
351
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
352
|
+ B10000111,B11111110,B00000111,B00000001,
|
|
353
|
+ B10000111,B11111110,B00111111,B11100001,
|
|
354
|
+ B10000000,B01100000,B00011111,B11000001,
|
|
355
|
+ B10000000,B01100000,B00001111,B10000001,
|
|
356
|
+ B10000000,B01100000,B00000111,B00000001,
|
|
357
|
+ B10000000,B01100000,B00000010,B00000001,
|
|
358
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
359
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
360
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
361
|
+ B10000000,B00000000,B00000000,B00000001,
|
|
362
|
+ B01111111,B11111111,B11111111,B11111110,
|
|
363
|
+ };
|
|
364
|
+
|
|
365
|
+ #endif
|
315
|
366
|
|
316
|
367
|
static const uint8_t buttonC[] = {
|
317
|
368
|
B01111111,B11111111,B11111111,B11111110,
|
|
@@ -369,11 +420,8 @@ static const uint8_t ili9341_init_sequence[] = { // 0x9341 - ILI9341
|
369
|
420
|
|
370
|
421
|
// Used to fill RGB565 (16bits) background
|
371
|
422
|
inline void memset2(const void *ptr, uint16_t fill, size_t cnt) {
|
372
|
|
- uint16_t* wptr = (uint16_t*) ptr;
|
373
|
|
- for (size_t i = 0; i < cnt; i += 2) {
|
374
|
|
- *wptr = fill;
|
375
|
|
- wptr++;
|
376
|
|
- }
|
|
423
|
+ uint16_t* wptr = (uint16_t*)ptr;
|
|
424
|
+ for (size_t i = 0; i < cnt; i += 2) { *wptr = fill; wptr++; }
|
377
|
425
|
}
|
378
|
426
|
|
379
|
427
|
static bool preinit = true;
|