i2c version has an offset due to wrong copy of temp buffer to display buffer, fixed in Adafruit_SSD1306.h

Dependents:   ezSBC_MPU9250 Test_OLED_Display untodoenuno OledI2CDisplay ... more

Fork of Adafruit_GFX by Neal Horman

Files at this revision

API Documentation at this revision

Comitter:
JojoS
Date:
Mon Nov 17 22:55:42 2014 +0000
Parent:
16:7fb1d4d3525d
Child:
18:6aa925f254d6
Commit message:
removed DigitalOut2 helper, functions now included in DigitalOut

Changed in this revision

Adafruit_SSD1306.h Show annotated file Show diff for this revision Revisions of this file
--- a/Adafruit_SSD1306.h	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_SSD1306.h	Mon Nov 17 22:55:42 2014 +0000
@@ -29,16 +29,6 @@
 #include <vector>
 #include <algorithm>
 
-// A DigitalOut sub-class that provides a constructed default state
-class DigitalOut2 : public DigitalOut
-{
-public:
-	DigitalOut2(PinName pin, bool active = false) : DigitalOut(pin) { write(active); };
-	DigitalOut2& operator= (int value) { write(value); return *this; };
-	DigitalOut2& operator= (DigitalOut2& rhs) { write(rhs.read()); return *this; };
-	operator int() { return read(); };
-};
-
 #define SSD1306_EXTERNALVCC 0x1
 #define SSD1306_SWITCHCAPVCC 0x2
 
@@ -75,7 +65,7 @@
     
 protected:
 	virtual void sendDisplayBuffer() = 0;
-	DigitalOut2 rst;
+	DigitalOut rst;
 
 	// the memory buffer for the LCD
 	std::vector<uint8_t> buffer;
@@ -148,7 +138,7 @@
 		cs = 1;
 	};
 
-	DigitalOut2 cs, dc;
+	DigitalOut cs, dc;
 	SPI &mspi;
 };