My controller identifies as an ILI9328, but only works if initialised as an ILI9325. This fork includes a fix to force 9325 initialization when a 9328 is detected.

Dependents:   TouchScreenCalibrate TouchScreenGUIDemo

Fork of UniGraphic by GraphicsDisplay

Revision:
34:091b954c3205
Parent:
17:1dafb896c6f5
--- a/Inits/SSD1306.cpp	Mon Apr 11 16:54:35 2016 +0000
+++ b/Inits/SSD1306.cpp	Sun Jun 21 15:23:02 2020 +0100
@@ -56,13 +56,24 @@
     set_orientation(1);
     locate(0,0);
 }
+
+SSD1306::SSD1306(proto_t displayproto, int Hz, int address, PinName sda, PinName scl, const char* name , unsigned int LCDSIZE_X, unsigned  int LCDSIZE_Y)
+    : LCD(displayproto, Hz, address, sda, scl, LCDSIZE_X, LCDSIZE_Y, IC_X_SEGS, IC_Y_COMS, name)
+{
+    init();
+    cls();
+    set_orientation(1);
+    locate(0,0);
+}
+
+
 // reset and init the lcd controller
 void SSD1306::init()
 {
     /* Start Initial Sequence ----------------------------------------------------*/
     
   //  wr_cmd8(0xE2);   //  sw reset
-    wait_ms(15);
+    ThisThread::sleep_for(15);
     
     wr_cmd8(SSD1306_DISPLAYOFF);    // no problem in SPI_16 for single byte cmds
     wr_cmd16((SSD1306_SETDISPLAYCLOCKDIV<<8)|0x80);   // wr_cmd16 for multibyte cmds issue in SPI16 mode