mirror of
https://github.com/YuzuZensai/MCUFRIEND_kbv.git
synced 2026-01-31 14:57:48 +00:00
conditional support for S6D05A1 controller. readID() and begin(0x05A1)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
//#define SUPPORT_0139 //S6D0139 +280 bytes
|
||||
#define SUPPORT_0154 //S6D0154 +320 bytes
|
||||
//#define SUPPORT_05A1 //for S6D05A1
|
||||
//#define SUPPORT_1289 //SSD1289,SSD1297 (ID=0x9797) +626 bytes, 0.03s
|
||||
//#define SUPPORT_1580 //R61580 Untested
|
||||
#define SUPPORT_1963 //only works with 16BIT bus anyway
|
||||
@@ -214,6 +215,8 @@ uint16_t MCUFRIEND_kbv::readID(void)
|
||||
return 0x1526; //subsequent begin() enables Command Access
|
||||
if (ret == 0xFF00) //R61520: [xx FF FF 00]
|
||||
return 0x1520; //subsequent begin() enables Command Access
|
||||
if (ret == 0xF000) //S6D05A1: [xx F0 F0 00]
|
||||
return 0x05A1; //subsequent begin() enables Command Access
|
||||
//#endif
|
||||
ret = readReg40(0xBF);
|
||||
if (ret == 0x8357) //HX8357B: [xx 01 62 83 57 FF]
|
||||
@@ -1031,6 +1034,37 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_05A1
|
||||
case 0x05A1:
|
||||
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS;
|
||||
static const uint8_t S6D05A1_regValues_max[] PROGMEM = {
|
||||
0xF0, 2, 0x5A, 0x5A,
|
||||
0xF1, 2, 0x5A, 0x5A,
|
||||
0xF2, 19, 0x3B, 0x33, 0x03, 0x0C, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0C, 0x08, 0x0C, 0x08,
|
||||
0xF4, 14, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x70, 0x03, 0x04, 0x70, 0x03,
|
||||
0xF5, 12, 0x00, 0x46, 0x70, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x46, 0x70,
|
||||
0xF6, 8, 0x03, 0x00, 0x08, 0x03, 0x03, 0x00, 0x03, 0x00,
|
||||
0xF7, 5, 0x00, 0x80, 0x10, 0x02, 0x00,
|
||||
0xF8, 2, 0x11, 0x00,
|
||||
0xF9, 1, 0x14,
|
||||
0xFA, 16, 0x33, 0x07, 0x04, 0x1A, 0x18, 0x1C, 0x24, 0x1D, 0x26, 0x28, 0x2F, 0x2E, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFB, 16, 0x33, 0x03, 0x00, 0x2E, 0x2F, 0x28, 0x26, 0x1D, 0x24, 0x1C, 0x18, 0x1A, 0x04, 0x00, 0x00, 0x00,
|
||||
0xF9, 1, 0x12,
|
||||
0xFA, 16, 0x36, 0x07, 0x04, 0x1C, 0x1C, 0x23, 0x28, 0x1C, 0x25, 0x26, 0x2E, 0x2B, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFB, 16, 0x33, 0x06, 0x00, 0x2B, 0x2E, 0x26, 0x25, 0x1C, 0x28, 0x23, 0x1C, 0x1C, 0x04, 0x00, 0x00, 0x00,
|
||||
0xF9, 1, 0x11,
|
||||
0xFA, 16, 0x33, 0x07, 0x04, 0x30, 0x32, 0x34, 0x35, 0x11, 0x1D, 0x20, 0x28, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFB, 16, 0x33, 0x03, 0x00, 0x20, 0x28, 0x20, 0x1D, 0x11, 0x35, 0x34, 0x32, 0x30, 0x04, 0x00, 0x00, 0x00,
|
||||
0x44, 2, 0x00, 0x01,
|
||||
};
|
||||
table8_ads = S6D05A1_regValues_max, table_size = sizeof(S6D05A1_regValues_max);
|
||||
p16 = (int16_t *) & HEIGHT;
|
||||
*p16 = 480;
|
||||
p16 = (int16_t *) & WIDTH;
|
||||
*p16 = 320;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_1289
|
||||
case 0x9797:
|
||||
is9797 = 1;
|
||||
|
||||
Reference in New Issue
Block a user