From d8009e3f549f61073271cb341122a7ab30e4f26d Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Thu, 16 Mar 2017 22:08:15 +0000 Subject: [PATCH] detect NT35310, add table. --- MCUFRIEND_kbv.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/MCUFRIEND_kbv.cpp b/MCUFRIEND_kbv.cpp index de5bb1e..91ce8c6 100644 --- a/MCUFRIEND_kbv.cpp +++ b/MCUFRIEND_kbv.cpp @@ -215,6 +215,9 @@ uint16_t MCUFRIEND_kbv::readID(void) return 0x1581; if (ret == 0x1400) //?RM68140:[xx FF 68 14 00] not tested yet return 0x6814; + ret = readReg32(0xD4); + if (ret == 0x5310) //NT35310: [xx 01 53 10] + return 0x5310; ret = readReg40(0xEF); //ILI9327: [xx 02 04 93 27 FF] if (ret == 0x9327) return 0x9327; @@ -1243,6 +1246,18 @@ case 0x4532: // thanks Leodino break; #endif + case 0x5310: + _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | INVERT_SS | INVERT_RGB | READ_24BITS; + static const uint8_t NT35310_regValues[] PROGMEM = { // + TFTLCD_DELAY8, 10, //just some dummy + }; + table8_ads = NT35310_regValues, table_size = sizeof(NT35310_regValues); + p16 = (int16_t *) & HEIGHT; + *p16 = 480; + p16 = (int16_t *) & WIDTH; + *p16 = 320; + break; + #ifdef SUPPORT_68140 case 0x6814: _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS;