From 822a71b771969c00a912fa33e00ec4bec9e9e9af Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Tue, 7 Dec 2021 23:03:12 +0000 Subject: [PATCH] 0x9327: alter SCN in PANEL_DRV for rotations 2,3 --- MCUFRIEND_kbv.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MCUFRIEND_kbv.cpp b/MCUFRIEND_kbv.cpp index e54a2d8..adbfb94 100644 --- a/MCUFRIEND_kbv.cpp +++ b/MCUFRIEND_kbv.cpp @@ -24,7 +24,7 @@ //#define SUPPORT_9806 //UNTESTED #define SUPPORT_9488_555 //costs +230 bytes, 0.03s / 0.19s #define SUPPORT_B509_7793 //R61509, ST7793 +244 bytes -#define OFFSET_9327 32 //costs about 103 bytes, 0.08s +//#define OFFSET_9327 32 //costs about 103 bytes, 0.08s #include "MCUFRIEND_kbv.h" #if defined(USE_SERIAL) @@ -393,6 +393,14 @@ void MCUFRIEND_kbv::setRotation(uint8_t r) d[2] = 0x3B; WriteCmdParamN(0xB6, 3, d); goto common_MC; +#if !defined(OFFSET_9327) + } else if (_lcd_ID == 0x9327) { //better + d[0] = 0; + d[1] = (400 / 8) - 1; //NL + d[2] = (val & 0x80) ? (432 - 400) / 4 : 0; //SCN (SM=0) + WriteCmdParamN(0xC0, 3, d); //PANEL_DRV + goto common_MC; +#endif } else if (_lcd_ID == 0x1963 || _lcd_ID == 0x9481 || _lcd_ID == 0x1511) { if (val & 0x80) val |= 0x01; //GS