mirror of
https://github.com/YuzuZensai/MCUFRIEND_kbv.git
synced 2026-01-06 04:32:38 +00:00
add UC8230
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define SUPPORT_4535 //LGDP4535 +180 bytes
|
||||
#define SUPPORT_68140 //RM68140 +52 bytes defaults to PIXFMT=0x55
|
||||
#define SUPPORT_7781 //ST7781 +172 bytes
|
||||
//#define SUPPORT_8230 //UC8230 +48 bytes
|
||||
//#define SUPPORT_8347D //HX8347-D, HX8347-G, HX8347-I +520 bytes, 0.27s
|
||||
//#define SUPPORT_8347A //HX8347-A +500 bytes, 0.27s
|
||||
//#define SUPPORT_8352A //HX8352A +486 bytes, 0.27s
|
||||
@@ -424,6 +425,16 @@ void MCUFRIEND_kbv::setRotation(uint8_t r)
|
||||
WriteCmdData(0x01, SS); // set Driver Output Control
|
||||
common_ORG:
|
||||
ORG = (val & 0x20) ? (1 << 3) : 0;
|
||||
#ifdef SUPPORT_8230
|
||||
if (_lcd_ID == 0x8230) { // UC8230 has strange BGR and READ_BGR behaviour
|
||||
if (rotation == 1 || rotation == 2) {
|
||||
val ^= 0x08; // change BGR bit for LANDSCAPE and PORTRAIT_REV
|
||||
}
|
||||
if (rotation == 1 || rotation == 2) {
|
||||
_lcd_capable &= ~READ_BGR; //remove the attribute in LANDSCAPE, PORTRAIT_REV
|
||||
} else _lcd_capable |= READ_BGR; //force the attribute in PORTRAIT, LANDSCAPE_REV
|
||||
}
|
||||
#endif
|
||||
if (val & 0x08)
|
||||
ORG |= 0x1000; //BGR
|
||||
_lcd_madctl = ORG | 0x0030;
|
||||
@@ -1632,6 +1643,9 @@ case 0x4532: // thanks Leodino
|
||||
*p16 = 320;
|
||||
break;
|
||||
|
||||
case 0x8230:
|
||||
_lcd_capable = 0 | REV_SCREEN | INVERT_GS | INVERT_RGB;
|
||||
goto common_9320;
|
||||
case 0x5408:
|
||||
_lcd_capable = 0 | REV_SCREEN | READ_BGR | INVERT_GS;
|
||||
goto common_9320;
|
||||
|
||||
@@ -61,7 +61,7 @@ ST7781 240x320 ID=0x7783 #define SUPPORT_7781 (no Vertical Scroll)
|
||||
ST7789V 240x320 ID=0x7789
|
||||
ST7793 240x400 ID=0x7793 #define SUPPORT_B509_7793
|
||||
ST7796 320x480 ID=0x7796
|
||||
UC8230 240x320 ID=0x8230
|
||||
UC8230 240x320 ID=0x8230 #define SUPPORT_8230
|
||||
UNKNOWN 320x480 ID=0x1511 (scroll directions not correct)
|
||||
UNKNOWN 240x320 ID=0x1602
|
||||
UNKNOWN 240x320 ID=0xAC11
|
||||
|
||||
Reference in New Issue
Block a user