A fork with some I2C optimizations that speed up the display.
Fork of SSD1308_128x64_I2C by
Diff: SSD1308.h
- Revision:
- 3:fa18169dd7e6
- Parent:
- 2:16c84a134393
- Child:
- 4:df92b0c0cb92
--- a/SSD1308.h Mon Jul 23 20:03:18 2012 +0000 +++ b/SSD1308.h Mon Jul 23 20:24:11 2012 +0000 @@ -170,6 +170,49 @@ #define SET_VERTICAL_SCROLL_AREA 0xA3 // takes 2 bytes: Rows in Top Area (Reset=0), Rows in Scroll Area (Reset=64) + + +/** Class to control an SSD1308 based oled Display + * + * Example: + * @code + * #include "mbed.h" + * #include "mbed_logo.h" + * #include "SSD1308.h" + + * //Pin Defines for I2C Bus + * #define D_SDA p28 + * #define D_SCL p27 + * I2C i2c(D_SDA, D_SCL); + * + * // Host PC Communication channels + * Serial pc(USBTX, USBRX); // tx, rx + * + * // Instantiate OLED + * SSD1308 oled = SSD1308(i2c, SSD1308_SA0); + * + * int main() { + * pc.printf("OLED test start\r"); + * oled.writeString(0, 0, "Hello World !"); + * // oled.printf("Hello World !"); + * + * oled.fillDisplay(0xAA); + * oled.setDisplayOff(); + * wait(1); + * oled.setDisplayOn(); + * + * oled.clearDisplay(); + * oled.setDisplayInverse(); + * wait(0.5); + * oled.setDisplayNormal(); + * + * oled.writeBitmap((uint8_t*) mbed_logo); + * + * pc.printf("OLED test done\r\n"); + * } + * + * @endcode + */ class SSD1308 : public Stream { public: