From 24e17b47bbcd5ee8f5a257780834312ce3e6b487 Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Fri, 1 May 2020 14:31:37 +0100 Subject: [PATCH] specific ST7796 init sequence --- MCUFRIEND_kbv.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MCUFRIEND_kbv.cpp b/MCUFRIEND_kbv.cpp index 7af5732..66ad08e 100644 --- a/MCUFRIEND_kbv.cpp +++ b/MCUFRIEND_kbv.cpp @@ -2708,7 +2708,17 @@ case 0x4532: // thanks Leodino break; case 0x7796: _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS; //thanks to safari1 - goto common_9488; + static const uint8_t PROGMEM ST7796_regValues[] = { + 0xB7, 1, 0xC6, //Entry Mode [06] + 0xE8, 8, 0x40, 0x8A, 0x00, 0x00, 0x29, 0x19, 0xA5, 0x33, //Adj3 [40 8A 00 00 25 0A 38 33] + }; + table8_ads = ST7796_regValues, table_size = sizeof(ST7796_regValues); + p16 = (int16_t *) & HEIGHT; + *p16 = 480; + p16 = (int16_t *) & WIDTH; + *p16 = 320; + break; + //goto common_9488; case 0x9487: //with thanks to Charlyf case 0x9488: _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS;