Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which are per-display and are the only part needed to be adapted to diff hw.

Dependents:   testUniGraphic_150217 maze_TFT_MMA8451Q TFT_test_frdm-kl25z TFT_test_NUCLEO-F411RE ... more

Revision:
33:f87f06292637
Parent:
17:1dafb896c6f5
Child:
34:c66986d80f72
--- a/Inits/SSD1306.cpp	Mon May 02 22:44:05 2016 +0000
+++ b/Inits/SSD1306.cpp	Mon Feb 06 12:29:33 2017 +0000
@@ -56,6 +56,17 @@
     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()
 {