correct rot=2, rot=3 for ST7793. please test ILI9326, SPFD5420, R61509V

This commit is contained in:
prenticedavid
2021-12-23 11:31:26 +00:00
parent c0474ff0c3
commit 7d6a167e51

View File

@@ -472,9 +472,11 @@ void MCUFRIEND_kbv::setRotation(uint8_t r)
case 0xB509:
_MC = 0x200, _MP = 0x201, _MW = 0x202, _SC = 0x210, _EC = 0x211, _SP = 0x212, _EP = 0x213;
GS = (val & 0x80) ? (1 << 15) : 0;
uint16_t NL;
NL = ((432 / 8) - 1) << 9;
if (_lcd_ID == 0x9326 || _lcd_ID == 0x5420) NL >>= 1;
uint16_t NL = ((400 / 8) - 1) << 9; // 400 rows
if (_lcd_ID == 0x9326 || _lcd_ID == 0x5420) { //NL and SCN are in diff position
if (GS) GS |= (4 << 0); //start SCN at row 32 PLEASE TEST ILI9326, SPFD5420
NL >>= 1;
}
WriteCmdData(0x400, GS | NL);
goto common_SS;
default: