add conditonal 8BIT vs 16BIT

This commit is contained in:
prenticedavid
2021-08-20 20:58:06 +01:00
parent aa99fe16bf
commit 239517d5ee

View File

@@ -1271,16 +1271,21 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
break;
#endif
#if defined(SUPPORT_1963) && USING_16BIT_BUS
#if defined(SUPPORT_1963)
case 0x1963:
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | READ_NODUMMY | INVERT_SS | INVERT_RGB;
// from NHD 5.0" 8-bit
#if USING_16BIT_BUS
#define SSD1963_PIXDATA 0x03
#else
#define SSD1963_PIXDATA 0x00
#endif
// from NHD 5.0" 8-bit
static const uint8_t SSD1963_NHD_50_regValues[] PROGMEM = {
(0xE0), 1, 0x01, // PLL enable
TFTLCD_DELAY8, 10,
(0xE0), 1, 0x03, // Lock PLL
(0xB0), 7, 0x08, 0x80, 0x03, 0x1F, 0x01, 0xDF, 0x00, //LCD SPECIFICATION
(0xF0), 1, 0x03, //was 00 pixel data interface
(0xB0), 7, 0x24, 0x80, 0x03, 0x1F, 0x01, 0xDF, 0x00, //LCD SPECIFICATION was 0x08
(0xF0), 1, SSD1963_PIXDATA, //was 00 pixel data interface
// (0x3A), 1, 0x60, // SET R G B format = 6 6 6
(0xE2), 3, 0x1D, 0x02, 0x54, //PLL multiplier, set PLL clock to 120M
(0xE6), 3, 0x02, 0xFF, 0xFF, //PLL setting for PCLK, depends on resolution
@@ -1297,8 +1302,8 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
(0xE0), 1, 0x03, // Lock PLL
0x01, 0, //Soft Reset
TFTLCD_DELAY8, 120,
(0xB0), 7, 0x08, 0x80, 0x03, 0x1F, 0x01, 0xDF, 0x00, //LCD SPECIFICATION
(0xF0), 1, 0x03, //was 00 pixel data interface
(0xB0), 7, 0x24, 0x80, 0x03, 0x1F, 0x01, 0xDF, 0x00, //LCD SPECIFICATION was 0x08
(0xF0), 1, SSD1963_PIXDATA, //was 00 pixel data interface
// (0x3A), 1, 0x60, // SET R G B format = 6 6 6
(0xE6), 3, 0x0F, 0xFF, 0xFF, //PLL setting for PCLK, depends on resolution
(0xB4), 8, 0x04, 0x20, 0x00, 0x58, 0x80, 0x00, 0x00, 0x00, //HSYNC
@@ -1322,7 +1327,7 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
(0xB6), 7, 0x02, 0x0D, 0x00, 0x10, 0x10, 0x00, 0x08, //VSYNC
(0xBA), 1, 0x0F, //GPIO[3:0] out 1
(0xB8), 2, 0x07, 0x01, //GPIO3=input, GPIO[2:0]=output
(0xF0), 1, 0x03, //pixel data interface
(0xF0), 1, SSD1963_PIXDATA, //pixel data interface
TFTLCD_DELAY8, 1,
0x28, 0, //Display Off
0x11, 0, //Sleep Out
@@ -1346,7 +1351,7 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
(0xB6), 7, 0x02, 0x0D, 0x00, 0x10, 0x10, 0x00, 0x08, //VSYNC VT=525, VPS=16, VPW=16, FPS=8
(0xBA), 1, 0x0F, //GPIO[3:0] out 1
(0xB8), 2, 0x07, 0x01, //GPIO3=input, GPIO[2:0]=output
(0xF0), 1, 0x03, //pixel data interface
(0xF0), 1, SSD1963_PIXDATA, //pixel data interface
TFTLCD_DELAY8, 1,
0x28, 0, //Display Off
0x11, 0, //Sleep Out
@@ -1370,7 +1375,7 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
(0xB6), 7, 0x02, 0x0D, 0x00, 0x10, 0x10, 0x00, 0x08, //VSYNC VT=525, VPS=16, VPW=16, FPS=8
(0xBA), 1, 0x0F, //GPIO[3:0] out 1
(0xB8), 2, 0x07, 0x01, //GPIO3=input, GPIO[2:0]=output
(0xF0), 1, 0x03, //pixel data interface
(0xF0), 1, SSD1963_PIXDATA, //pixel data interface
TFTLCD_DELAY8, 1,
0x28, 0, //Display Off
0x11, 0, //Sleep Out
@@ -1394,7 +1399,7 @@ void MCUFRIEND_kbv::begin(uint16_t ID)
(0xB6), 7, 0x01, 0x20, 0x00, 0x04, 0x0C, 0x00, 0x02, //VSYNC
(0xBA), 1, 0x0F, //GPIO[3:0] out 1
(0xB8), 2, 0x07, 0x01, //GPIO3=input, GPIO[2:0]=output
(0xF0), 1, 0x03, //pixel data interface
(0xF0), 1, SSD1963_PIXDATA, //pixel data interface
TFTLCD_DELAY8, 1,
0x28, 0, //Display Off
0x11, 0, //Sleep Out