Forked from Neal Horman: Adafruit_GFX, 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. Now it is adopted also for the SH1106 I2C 128x64 display as well...

Dependents:   Lab06_oled_i2c Lab06_BME280_oled Lab06_oled_clock I2C_SSD1306andSH1106_nucleo_F446RE

Revision:
20:da33cca77ce5
Parent:
19:1b773847a04b
--- a/Adafruit_GFX.h	Tue Feb 01 15:20:21 2022 +0000
+++ b/Adafruit_GFX.h	Wed Feb 02 17:55:38 2022 +0000
@@ -13,6 +13,7 @@
 All text above must be included in any redistribution
 ****************************************/
 
+
 /*
  *  Modified by Neal Horman 7/14/2012 for use in mbed
  */
@@ -45,6 +46,43 @@
  * The Display drivers push the display buffer to the
  * hardware based on application control.
  *
+ * Example:
+ * @code
+ * #include "mbed.h"
+ * #include "Adafruit_SSD1306.h"
+ *
+ * I2C i2c(D14,D15);
+ * Adafruit_SH1106_I2c oled(i2c, NC, 0x78, 64, 128);     // SH1106  I2C 128x64, with no reset pin
+ * // Adafruit_SSD1306_I2c oled(i2c, NC, 0x78, 64, 128); // SSD1306 I2C 128x64, with no reset pin
+ * // Adafruit_SSD1306_I2c oled(i2c, NC, 0x78, 32, 128); // SSD1306 I2C 128x32, with no reset pin
+ *
+ *
+ * int main()
+ * {
+ *     uint16_t x=0;
+ *     i2c.frequency(400000);
+ *     oled.setRotation(0);
+ *     oled.clearDisplay();
+ *     oled.drawRect(0,0,oled.width(),oled.height(),1);
+ *     oled.display();
+ *     oled.setTextColor(1);
+ *     oled.setTextSize(1);
+ *     oled.setTextCursor(10,8);
+ *     oled.printf("SH1106 %ux%u",oled.width(),oled.height());
+ *     oled.display();
+ *     wait(2.0);
+ *     oled.setTextSize(2);
+ *     while(1) {
+ *         oled.clearDisplay();
+ *         oled.drawRect(0,0,oled.width(),oled.height(),1);
+ *         oled.setTextCursor(10,8);
+ *         oled.printf("x = %u",x++);
+ *         oled.display();
+ *         wait(1.0);
+ *     }
+ * }
+ * @endcode
+ *
  */
 class Adafruit_GFX : public Stream
 {