corrected ID test for ILI9163

This commit is contained in:
prenticedavid
2019-02-15 09:07:01 +00:00
parent a4f504a7ba
commit dda0e4ead2

View File

@@ -261,9 +261,12 @@ uint16_t MCUFRIEND_kbv::readID(void)
return 0x7789;
if (ret == 0xAC11) //?unknown [xx 61 AC 11]
return 0xAC11;
ret32 = readReg32(0xD3); //[xx 91 63 00]
ret = ret32 >> 8;
if (ret == 0x9163) return ret;
ret = readReg32(0xD3); //for ILI9488, 9486, 9340, 9341
msb = ret >> 8;
if (msb == 0x91 || msb == 0x93 || msb == 0x94 || msb == 0x98 || msb == 0x77 || msb == 0x16)
if (msb == 0x93 || msb == 0x94 || msb == 0x98 || msb == 0x77 || msb == 0x16)
return ret; //0x9488, 9486, 9340, 9341, 7796
if (ret == 0x00D3 || ret == 0xD3D3)
return ret; //16-bit write-only bus