A derived version of the BSD licensed Adafrut GFX library for the SSD1306 controller for an OLED 128x32 or 128x64 display using SPI or I2C.

Revision:
17:f4d16c036914
Parent:
15:77feec1c0684
--- a/Adafruit_SSD1306.h	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_SSD1306.h	Sat Dec 08 15:54:37 2018 +0000
@@ -25,6 +25,7 @@
 
 #include "mbed.h"
 #include "Adafruit_GFX.h"
+#include "SWSPI.h"
 
 #include <vector>
 #include <algorithm>
@@ -100,7 +101,7 @@
 	 * @param rawHeight - the vertical number of pixels for the display, defaults to 32
 	 * @param rawWidth - the horizonal number of pixels for the display, defaults to 128
 	 */
-	Adafruit_SSD1306_Spi(SPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128)
+	Adafruit_SSD1306_Spi(SWSPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128)
 	    : Adafruit_SSD1306(RST, rawHieght, rawWidth)
 	    , cs(CS,true)
 	    , dc(DC,false)
@@ -149,7 +150,7 @@
 	};
 
 	DigitalOut2 cs, dc;
-	SPI &mspi;
+	SWSPI &mspi;
 };
 
 /** This is the I2C SSD1306 display driver transport class