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.

Dependents:   Low_Power_Long_Distance_IR_Vision_Robot Low_Power_Long_Distance_IR_Vision_Robot

Fork of Adafruit_GFX by Neal Horman

Files at this revision

API Documentation at this revision

Comitter:
dev_alexander
Date:
Wed Aug 01 01:45:24 2018 +0000
Parent:
16:7fb1d4d3525d
Commit message:
Made it function with this demo as the RST pin is not PIN that is defined in the MAX326XX to the extent that I saw.

Changed in this revision

Adafruit_GFX_Config.h Show annotated file Show diff for this revision Revisions of this file
Adafruit_SSD1306.cpp Show annotated file Show diff for this revision Revisions of this file
Adafruit_SSD1306.h Show annotated file Show diff for this revision Revisions of this file
maxim_bitmap.h Show annotated file Show diff for this revision Revisions of this file
diff -r 7fb1d4d3525d -r 4b1d8d813d7f Adafruit_GFX_Config.h
--- a/Adafruit_GFX_Config.h	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_GFX_Config.h	Wed Aug 01 01:45:24 2018 +0000
@@ -2,10 +2,10 @@
 #define _ADAFRUIT_GFX_CONFIG_H_
 
 // Uncomment this to turn off the builtin splash
-//#define NO_SPLASH_ADAFRUIT
+#define NO_SPLASH_ADAFRUIT
 
 // Uncomment this to enable all functionality
-//#define GFX_WANT_ABSTRACTS
+#define GFX_WANT_ABSTRACTS
 
 // Uncomment this to enable only runtime font scaling, without all the rest of the Abstracts
 //#define GFX_SIZEABLE_TEXT
diff -r 7fb1d4d3525d -r 4b1d8d813d7f Adafruit_SSD1306.cpp
--- a/Adafruit_SSD1306.cpp	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_SSD1306.cpp	Wed Aug 01 01:45:24 2018 +0000
@@ -4,14 +4,14 @@
   Pick one up today in the adafruit shop!
   ------> http://www.adafruit.com/category/63_98
 
-These displays use SPI to communicate, 4 or 5 pins are required to  
+These displays use SPI to communicate, 4 or 5 pins are required to
 interface
 
-Adafruit invests time and resources providing this open source code, 
-please support Adafruit and open-source hardware by purchasing 
+Adafruit invests time and resources providing this open source code,
+please support Adafruit and open-source hardware by purchasing
 products from Adafruit!
 
-Written by Limor Fried/Ladyada  for Adafruit Industries.  
+Written by Limor Fried/Ladyada  for Adafruit Industries.
 BSD license, check license.txt for more information
 All text above, and the splash screen below must be included in any redistribution
 *********************************************************************/
@@ -47,16 +47,6 @@
 
 void Adafruit_SSD1306::begin(uint8_t vccstate)
 {
-    rst = 1;
-    // VDD (3.3V) goes high at start, lets just chill for a ms
-    wait_ms(1);
-    // bring reset low
-    rst = 0;
-    // wait 10ms
-    wait_ms(10);
-    // bring out of reset
-    rst = 1;
-    // turn on VCC (9V?)
 
     command(SSD1306_DISPLAYOFF);
     command(SSD1306_SETDISPLAYCLOCKDIV);
@@ -95,7 +85,7 @@
     command(SSD1306_DISPLAYALLON_RESUME);
 
     command(SSD1306_NORMALDISPLAY);
-    
+
     command(SSD1306_DISPLAYON);
 }
 
@@ -104,10 +94,9 @@
 {
     if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
         return;
-    
+
     // check rotation, move pixel around if necessary
-    switch (getRotation())
-    {
+    switch (getRotation()) {
         case 1:
             swap(x, y);
             x = _rawWidth - x - 1;
@@ -120,111 +109,189 @@
             swap(x, y);
             y = _rawHeight - y - 1;
             break;
-    }  
-    
+    }
+
     // x is which column
-    if (color == WHITE) 
-        buffer[x+ (y/8)*_rawWidth] |= _BV((y%8));  
+    if (color == WHITE)
+        buffer[x+ (y/8)*_rawWidth] |= _BV((y%8));
     else // else black
-        buffer[x+ (y/8)*_rawWidth] &= ~_BV((y%8)); 
+        buffer[x+ (y/8)*_rawWidth] &= ~_BV((y%8));
 }
 
 void Adafruit_SSD1306::invertDisplay(bool i)
 {
-	command(i ? SSD1306_INVERTDISPLAY : SSD1306_NORMALDISPLAY);
+    command(i ? SSD1306_INVERTDISPLAY : SSD1306_NORMALDISPLAY);
 }
 
 // Send the display buffer out to the display
 void Adafruit_SSD1306::display(void)
 {
-	command(SSD1306_SETLOWCOLUMN | 0x0);  // low col = 0
-	command(SSD1306_SETHIGHCOLUMN | 0x0);  // hi col = 0
-	command(SSD1306_SETSTARTLINE | 0x0); // line #0
-	sendDisplayBuffer();
+    command(SSD1306_SETLOWCOLUMN | 0x0);  // low col = 0
+    command(SSD1306_SETHIGHCOLUMN | 0x0);  // hi col = 0
+    command(SSD1306_SETSTARTLINE | 0x0); // line #0
+    sendDisplayBuffer();
 }
 
 // Clear the display buffer. Requires a display() call at some point afterwards
 void Adafruit_SSD1306::clearDisplay(void)
 {
-	std::fill(buffer.begin(),buffer.end(),0);
+    std::fill(buffer.begin(),buffer.end(),0);
+}
+
+
+
+
+
+// startscrollright
+// Activate a right handed scroll for rows start through stop
+// Hint, the display is 16 rows tall. To scroll the whole display, run:
+// display.scrollright(0x00, 0x0F)
+void Adafruit_SSD1306::startscrollright(uint8_t start, uint8_t stop)
+{
+    command(SSD1306_RIGHT_HORIZONTAL_SCROLL);
+    command(0X00);
+    command(start);
+    command(0X00);
+    command(stop);
+    command(0X00);
+    command(0XFF);
+    command(SSD1306_ACTIVATE_SCROLL);
+}
+
+// startscrollleft
+// Activate a right handed scroll for rows start through stop
+// Hint, the display is 16 rows tall. To scroll the whole display, run:
+// display.scrollright(0x00, 0x0F)
+void Adafruit_SSD1306::startscrollleft(uint8_t start, uint8_t stop)
+{
+    command(SSD1306_LEFT_HORIZONTAL_SCROLL);
+    command(0X00);
+    command(start);
+    command(0X00);
+    command(stop);
+    command(0X00);
+    command(0XFF);
+    command(SSD1306_ACTIVATE_SCROLL);
 }
 
+// startscrolldiagright
+// Activate a diagonal scroll for rows start through stop
+// Hint, the display is 16 rows tall. To scroll the whole display, run:
+// display.scrollright(0x00, 0x0F)
+void Adafruit_SSD1306::startscrolldiagright(uint8_t start, uint8_t stop)
+{
+    command(SSD1306_SET_VERTICAL_SCROLL_AREA);
+    command(0X00);
+    command(SSD1306_LCDHEIGHT);
+    command(SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL);
+    command(0X00);
+    command(start);
+    command(0X00);
+    command(stop);
+    command(0X01);
+    command(SSD1306_ACTIVATE_SCROLL);
+}
+
+// startscrolldiagleft
+// Activate a diagonal scroll for rows start through stop
+// Hint, the display is 16 rows tall. To scroll the whole display, run:
+// display.scrollright(0x00, 0x0F)
+void Adafruit_SSD1306::startscrolldiagleft(uint8_t start, uint8_t stop)
+{
+    command(SSD1306_SET_VERTICAL_SCROLL_AREA);
+    command(0X00);
+    command(SSD1306_LCDHEIGHT);
+    command(SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL);
+    command(0X00);
+    command(start);
+    command(0X00);
+    command(stop);
+    command(0X01);
+    command(SSD1306_ACTIVATE_SCROLL);
+}
+
+void Adafruit_SSD1306::stopscroll(void)
+{
+    command(SSD1306_DEACTIVATE_SCROLL);
+}
+
+
+
 void Adafruit_SSD1306::splash(void)
 {
 #ifndef NO_SPLASH_ADAFRUIT
-	uint8_t adaFruitLogo[64 * 128 / 8] =
-	{ 
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
-		0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x80, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
-		0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0xFF,
-		0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
-		0x80, 0xFF, 0xFF, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x8C, 0x8E, 0x84, 0x00, 0x00, 0x80, 0xF8,
-		0xF8, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xE0, 0xE0, 0xC0, 0x80,
-		0x00, 0xE0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xC7, 0x01, 0x01,
-		0x01, 0x01, 0x83, 0xFF, 0xFF, 0x00, 0x00, 0x7C, 0xFE, 0xC7, 0x01, 0x01, 0x01, 0x01, 0x83, 0xFF,
-		0xFF, 0xFF, 0x00, 0x38, 0xFE, 0xC7, 0x83, 0x01, 0x01, 0x01, 0x83, 0xC7, 0xFF, 0xFF, 0x00, 0x00,
-		0x01, 0xFF, 0xFF, 0x01, 0x01, 0x00, 0xFF, 0xFF, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x7F, 0xFF,
-		0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0xFF,
-		0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x03, 0x0F, 0x3F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xC7, 0xC7, 0x8F,
-		0x8F, 0x9F, 0xBF, 0xFF, 0xFF, 0xC3, 0xC0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xFC,
-		0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF8, 0xF0, 0xF0, 0xE0, 0xC0, 0x00, 0x01, 0x03, 0x03, 0x03,
-		0x03, 0x03, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01,
-		0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x00, 0x00,
-		0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-		0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03,
-		0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		// 128x32^^^  128x64vvv
-		0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x0F,
-		0x87, 0xC7, 0xF7, 0xFF, 0xFF, 0x1F, 0x1F, 0x3D, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0x7C, 0x7D, 0xFF,
-		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x0F, 0x07, 0x00, 0x30, 0x30, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xC0, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0xC0, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x3F, 0x1F,
-		0x0F, 0x07, 0x1F, 0x7F, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xE0,
-		0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00,
-		0x00, 0xFC, 0xFE, 0xFC, 0x0C, 0x06, 0x06, 0x0E, 0xFC, 0xF8, 0x00, 0x00, 0xF0, 0xF8, 0x1C, 0x0E,
-		0x06, 0x06, 0x06, 0x0C, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFC,
-		0xFE, 0xFC, 0x00, 0x18, 0x3C, 0x7E, 0x66, 0xE6, 0xCE, 0x84, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x06,
-		0x06, 0xFC, 0xFE, 0xFC, 0x0C, 0x06, 0x06, 0x06, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00, 0xC0, 0xF8,
-		0xFC, 0x4E, 0x46, 0x46, 0x46, 0x4E, 0x7C, 0x78, 0x40, 0x18, 0x3C, 0x76, 0xE6, 0xCE, 0xCC, 0x80,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0F, 0x1F, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x03,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
-		0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x07, 0x0E, 0x0C,
-		0x18, 0x18, 0x0C, 0x06, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x01, 0x0F, 0x0E, 0x0C, 0x18, 0x0C, 0x0F,
-		0x07, 0x01, 0x00, 0x04, 0x0E, 0x0C, 0x18, 0x0C, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00,
-		0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x07,
-		0x07, 0x0C, 0x0C, 0x18, 0x1C, 0x0C, 0x06, 0x06, 0x00, 0x04, 0x0E, 0x0C, 0x18, 0x0C, 0x0F, 0x07,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-	};
-	
-	std::copy(
-		&adaFruitLogo[0]
-		, &adaFruitLogo[0] + (_rawHeight == 32 ? sizeof(adaFruitLogo)/2 : sizeof(adaFruitLogo))
-		, buffer.begin()
-		);
+    uint8_t adaFruitLogo[64 * 128 / 8] = {
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+        0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x80, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
+        0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0xFF,
+        0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
+        0x80, 0xFF, 0xFF, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x8C, 0x8E, 0x84, 0x00, 0x00, 0x80, 0xF8,
+        0xF8, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xE0, 0xE0, 0xC0, 0x80,
+        0x00, 0xE0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xC7, 0x01, 0x01,
+        0x01, 0x01, 0x83, 0xFF, 0xFF, 0x00, 0x00, 0x7C, 0xFE, 0xC7, 0x01, 0x01, 0x01, 0x01, 0x83, 0xFF,
+        0xFF, 0xFF, 0x00, 0x38, 0xFE, 0xC7, 0x83, 0x01, 0x01, 0x01, 0x83, 0xC7, 0xFF, 0xFF, 0x00, 0x00,
+        0x01, 0xFF, 0xFF, 0x01, 0x01, 0x00, 0xFF, 0xFF, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x7F, 0xFF,
+        0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0xFF,
+        0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x03, 0x0F, 0x3F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xC7, 0xC7, 0x8F,
+        0x8F, 0x9F, 0xBF, 0xFF, 0xFF, 0xC3, 0xC0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xFC,
+        0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF8, 0xF0, 0xF0, 0xE0, 0xC0, 0x00, 0x01, 0x03, 0x03, 0x03,
+        0x03, 0x03, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01,
+        0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x00, 0x00,
+        0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+        0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03,
+        0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        // 128x32^^^  128x64vvv
+        0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x0F,
+        0x87, 0xC7, 0xF7, 0xFF, 0xFF, 0x1F, 0x1F, 0x3D, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0x7C, 0x7D, 0xFF,
+        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x0F, 0x07, 0x00, 0x30, 0x30, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xC0, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0xC0, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x3F, 0x1F,
+        0x0F, 0x07, 0x1F, 0x7F, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xE0,
+        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00,
+        0x00, 0xFC, 0xFE, 0xFC, 0x0C, 0x06, 0x06, 0x0E, 0xFC, 0xF8, 0x00, 0x00, 0xF0, 0xF8, 0x1C, 0x0E,
+        0x06, 0x06, 0x06, 0x0C, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFC,
+        0xFE, 0xFC, 0x00, 0x18, 0x3C, 0x7E, 0x66, 0xE6, 0xCE, 0x84, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x06,
+        0x06, 0xFC, 0xFE, 0xFC, 0x0C, 0x06, 0x06, 0x06, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00, 0xC0, 0xF8,
+        0xFC, 0x4E, 0x46, 0x46, 0x46, 0x4E, 0x7C, 0x78, 0x40, 0x18, 0x3C, 0x76, 0xE6, 0xCE, 0xCC, 0x80,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0F, 0x1F, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x03,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
+        0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x07, 0x0E, 0x0C,
+        0x18, 0x18, 0x0C, 0x06, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x01, 0x0F, 0x0E, 0x0C, 0x18, 0x0C, 0x0F,
+        0x07, 0x01, 0x00, 0x04, 0x0E, 0x0C, 0x18, 0x0C, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00,
+        0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x07,
+        0x07, 0x0C, 0x0C, 0x18, 0x1C, 0x0C, 0x06, 0x06, 0x00, 0x04, 0x0E, 0x0C, 0x18, 0x0C, 0x0F, 0x07,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+    };
+
+    std::copy(
+        &adaFruitLogo[0]
+        , &adaFruitLogo[0] + (_rawHeight == 32 ? sizeof(adaFruitLogo)/2 : sizeof(adaFruitLogo))
+        , buffer.begin()
+    );
 #endif
 }
diff -r 7fb1d4d3525d -r 4b1d8d813d7f Adafruit_SSD1306.h
--- a/Adafruit_SSD1306.h	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_SSD1306.h	Wed Aug 01 01:45:24 2018 +0000
@@ -4,20 +4,21 @@
   Pick one up today in the adafruit shop!
   ------> http://www.adafruit.com/category/63_98
 
-These displays use SPI to communicate, 4 or 5 pins are required to  
+These displays use SPI to communicate, 4 or 5 pins are required to
 interface
 
-Adafruit invests time and resources providing this open source code, 
-please support Adafruit and open-source hardware by purchasing 
+Adafruit invests time and resources providing this open source code,
+please support Adafruit and open-source hardware by purchasing
 products from Adafruit!
 
-Written by Limor Fried/Ladyada  for Adafruit Industries.  
+Written by Limor Fried/Ladyada  for Adafruit Industries.
 BSD license, check license.txt for more information
 All text above, and the splash screen must be included in any redistribution
 *********************************************************************/
 
 /*
  *  Modified by Neal Horman 7/14/2012 for use in mbed
+ *  Modified by Greg Steiert 2/7/2017 for FeatherOLED
  */
 
 #ifndef _ADAFRUIT_SSD1306_H_
@@ -29,19 +30,21 @@
 #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
 
+#define SSD1306_LCDWIDTH                  128
+#define SSD1306_LCDHEIGHT                 32
+
+// Scrolling #defines
+#define SSD1306_ACTIVATE_SCROLL 0x2F
+#define SSD1306_DEACTIVATE_SCROLL 0x2E
+#define SSD1306_SET_VERTICAL_SCROLL_AREA 0xA3
+#define SSD1306_RIGHT_HORIZONTAL_SCROLL 0x26
+#define SSD1306_LEFT_HORIZONTAL_SCROLL 0x27
+#define SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL 0x29
+#define SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL 0x2A
+
 /** The pure base class for the SSD1306 display driver.
  *
  * You should derive from this for a new transport interface type,
@@ -50,107 +53,44 @@
 class Adafruit_SSD1306 : public Adafruit_GFX
 {
 public:
-	Adafruit_SSD1306(PinName RST, uint8_t rawHeight = 32, uint8_t rawWidth = 128)
-		: Adafruit_GFX(rawWidth,rawHeight)
-		, rst(RST,false)
-	{
-		buffer.resize(rawHeight * rawWidth / 8);
-	};
+    Adafruit_SSD1306(uint8_t rawHeight = 32, uint8_t rawWidth = 128)
+        : Adafruit_GFX(rawWidth,rawHeight) {
+        buffer.resize(rawHeight * rawWidth / 8);
+    };
 
-	void begin(uint8_t switchvcc = SSD1306_SWITCHCAPVCC);
-	
-	// These must be implemented in the derived transport driver
-	virtual void command(uint8_t c) = 0;
-	virtual void data(uint8_t c) = 0;
-	virtual void drawPixel(int16_t x, int16_t y, uint16_t color);
+    void begin(uint8_t switchvcc = SSD1306_SWITCHCAPVCC);
+
+    // These must be implemented in the derived transport driver
+    virtual void command(uint8_t c) = 0;
+    virtual void data(uint8_t c) = 0;
+    virtual void drawPixel(int16_t x, int16_t y, uint16_t color);
 
-	/// Clear the display buffer    
-	void clearDisplay(void);
-	virtual void invertDisplay(bool i);
+    /// Clear the display buffer
+    void clearDisplay(void);
+    virtual void invertDisplay(bool i);
 
-	/// Cause the display to be updated with the buffer content.
-	void display();
-	/// Fill the buffer with the AdaFruit splash screen.
-	virtual void splash();
-    
-protected:
-	virtual void sendDisplayBuffer() = 0;
-	DigitalOut2 rst;
+    /// Cause the display to be updated with the buffer content.
+    void display();
+    /// Fill the buffer with the AdaFruit splash screen.
+    virtual void splash();
 
-	// the memory buffer for the LCD
-	std::vector<uint8_t> buffer;
-};
+    //Scrolling Options
+    void startscrollright(uint8_t start, uint8_t stop);
+    void startscrollleft(uint8_t start, uint8_t stop);
+
+    void startscrolldiagright(uint8_t start, uint8_t stop);
+    void startscrolldiagleft(uint8_t start, uint8_t stop);
+    void stopscroll(void);
 
 
-/** This is the SPI SSD1306 display driver transport class
- *
- */
-class Adafruit_SSD1306_Spi : public Adafruit_SSD1306
-{
-public:
-	/** Create a SSD1306 SPI transport display driver instance with the specified DC, RST, and CS pins, as well as the display dimentions
-	 *
-	 * Required parameters
-	 * @param spi - a reference to an initialized SPI object
-	 * @param DC (Data/Command) pin name
-	 * @param RST (Reset) pin name
-	 * @param CS (Chip Select) pin name
-	 *
-	 * Optional parameters
-	 * @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(RST, rawHieght, rawWidth)
-	    , cs(CS,true)
-	    , dc(DC,false)
-	    , mspi(spi)
-	    {
-		    begin();
-		    splash();
-		    display();
-	    };
-
-	virtual void command(uint8_t c)
-	{
-	    cs = 1;
-	    dc = 0;
-	    cs = 0;
-	    mspi.write(c);
-	    cs = 1;
-	};
-
-	virtual void data(uint8_t c)
-	{
-	    cs = 1;
-	    dc = 1;
-	    cs = 0;
-	    mspi.write(c);
-	    cs = 1;
-	};
 
 protected:
-	virtual void sendDisplayBuffer()
-	{
-		cs = 1;
-		dc = 1;
-		cs = 0;
-
-		for(uint16_t i=0, q=buffer.size(); i<q; i++)
-			mspi.write(buffer[i]);
+    virtual void sendDisplayBuffer() = 0;
 
-		if(height() == 32)
-		{
-			for(uint16_t i=0, q=buffer.size(); i<q; i++)
-				mspi.write(0);
-		}
+    // the memory buffer for the LCD
+    std::vector<uint8_t> buffer;
+};
 
-		cs = 1;
-	};
-
-	DigitalOut2 cs, dc;
-	SPI &mspi;
-};
 
 /** This is the I2C SSD1306 display driver transport class
  *
@@ -158,63 +98,59 @@
 class Adafruit_SSD1306_I2c : public Adafruit_SSD1306
 {
 public:
-	#define SSD_I2C_ADDRESS     0x78
-	/** Create a SSD1306 I2C transport display driver instance with the specified RST pin name, the I2C address, as well as the display dimensions
-	 *
-	 * Required parameters
-	 * @param i2c - A reference to an initialized I2C object
-	 * @param RST - The Reset pin name
-	 *
-	 * Optional parameters
-	 * @param i2cAddress - The i2c address of the display
-	 * @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_I2c(I2C &i2c, PinName RST, uint8_t i2cAddress = SSD_I2C_ADDRESS, uint8_t rawHeight = 32, uint8_t rawWidth = 128)
-	    : Adafruit_SSD1306(RST, rawHeight, rawWidth)
-	    , mi2c(i2c)
-	    , mi2cAddress(i2cAddress)
-	    {
-		    begin();
-		    splash();
-		    display();
-	    };
+#define SSD_I2C_ADDRESS     0x78
+    /** Create a SSD1306 I2C transport display driver instance with the specified RST pin name, the I2C address, as well as the display dimensions
+     *
+     * Required parameters
+     * @param i2c - A reference to an initialized I2C object
+     * @param RST - The Reset pin name
+     *
+     * Optional parameters
+     * @param i2cAddress - The i2c address of the display
+     * @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_I2c(I2C &i2c, uint8_t i2cAddress = SSD_I2C_ADDRESS, uint8_t rawHeight = 32, uint8_t rawWidth = 128)
+        : Adafruit_SSD1306(rawHeight, rawWidth)
+        , mi2c(i2c)
+        , mi2cAddress(i2cAddress) {
+        begin();
+        splash();
+        display();
+    };
 
-	virtual void command(uint8_t c)
-	{
-		char buff[2];
-		buff[0] = 0; // Command Mode
-		buff[1] = c;
-		mi2c.write(mi2cAddress, buff, sizeof(buff));
-	}
+    virtual void command(uint8_t c) {
+        char buff[2];
+        buff[0] = 0; // Command Mode
+        buff[1] = c;
+        mi2c.write(mi2cAddress, buff, sizeof(buff));
+    }
 
-	virtual void data(uint8_t c)
-	{
-		char buff[2];
-		buff[0] = 0x40; // Data Mode
-		buff[1] = c;
-		mi2c.write(mi2cAddress, buff, sizeof(buff));
-	};
+    virtual void data(uint8_t c) {
+        char buff[2];
+        buff[0] = 0x40; // Data Mode
+        buff[1] = c;
+        mi2c.write(mi2cAddress, buff, sizeof(buff));
+    };
 
 protected:
-	virtual void sendDisplayBuffer()
-	{
-		char buff[17];
-		buff[0] = 0x40; // Data Mode
+    virtual void sendDisplayBuffer() {
+        char buff[17];
+        buff[0] = 0x40; // Data Mode
 
-		// send display buffer in 16 byte chunks
-		for(uint16_t i=0, q=buffer.size(); i<q; i+=16 ) 
-		{	uint8_t x ;
+        // send display buffer in 16 byte chunks
+        for(uint16_t i=0, q=buffer.size(); i<q; i+=16 ) {
+            uint8_t x ;
 
-			// TODO - this will segfault if buffer.size() % 16 != 0
-			for(x=1; x<sizeof(buff); x++) 
-				buff[x] = buffer[i+x-1];
-			mi2c.write(mi2cAddress, buff, sizeof(buff));
-		}
-	};
+            // TODO - this will segfault if buffer.size() % 16 != 0
+            for(x=1; x<sizeof(buff); x++)
+                buff[x] = buffer[i+x-1];
+            mi2c.write(mi2cAddress, buff, sizeof(buff));
+        }
+    };
 
-	I2C &mi2c;
-	uint8_t mi2cAddress;
+    I2C &mi2c;
+    uint8_t mi2cAddress;
 };
 
 #endif
\ No newline at end of file
diff -r 7fb1d4d3525d -r 4b1d8d813d7f maxim_bitmap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/maxim_bitmap.h	Wed Aug 01 01:45:24 2018 +0000
@@ -0,0 +1,130 @@
+/*********************************************************************
+This is a library for our Monochrome OLEDs based on SSD1306 drivers
+
+  Pick one up today in the adafruit shop!
+  ------> http://www.adafruit.com/category/63_98
+
+These displays use SPI to communicate, 4 or 5 pins are required to  
+interface
+
+Adafruit invests time and resources providing this open source code, 
+please support Adafruit and open-source hardware by purchasing 
+products from Adafruit!
+
+Written by Limor Fried/Ladyada  for Adafruit Industries.  
+BSD license, check license.txt for more information
+All text above, and the splash screen must be included in any redistribution
+*********************************************************************/
+
+/*
+ *  Modified by Felipe Neira MAX32630FTHR and MAX
+ */
+ 
+// For more information about Adafruit GFX Graphic library visit https://learn.adafruit.com/adafruit-gfx-graphics-library/overview
+// This bitmap was generated with the online tool http://javl.github.io/image2cpp/
+const uint8_t maximLarge[]= {
+    // 'MAXIM_LARGE_LOGO'
+    0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x07, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x0f, 0xff, 0xff, 0xf0, 0x00, 0x99, 0xc3, 0xcc, 0x24, 0xdc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0xff, 0xff, 0xf8, 0x00, 0xef, 0x66, 0x66, 0x44, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0xff, 0xff, 0xf8, 0x00, 0xc4, 0x20, 0x22, 0xc4, 0xc6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x07, 0xe0, 0x7c, 0x00, 0x84, 0x21, 0xe1, 0x84, 0xc6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3c, 0x03, 0xc0, 0x3e, 0x00, 0x84, 0x27, 0x21, 0x84, 0xc6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7c, 0x03, 0xc0, 0x3e, 0x00, 0x84, 0x24, 0x23, 0xc4, 0xc6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7c, 0x21, 0x86, 0x3e, 0x00, 0x84, 0x24, 0x66, 0x44, 0xc6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7c, 0x31, 0x8e, 0x3e, 0x00, 0x84, 0x27, 0xa4, 0x64, 0xc6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xfc, 0x3b, 0x0e, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xfc, 0x3a, 0x1e, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xfc, 0x3e, 0x3e, 0x3f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
+    0xfc, 0x3c, 0x3e, 0x3f, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00,
+    0xfc, 0x3c, 0x3e, 0x3f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00,
+    0xfc, 0x38, 0x1e, 0x3f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00,
+    0x7c, 0x38, 0x1e, 0x3e, 0x00, 0x8f, 0xdf, 0x3e, 0x3f, 0x2d, 0xf3, 0xe7, 0xc7, 0xe0, 0x00, 0x00,
+    0x7c, 0x30, 0x0e, 0x3e, 0x00, 0x8c, 0xc4, 0x62, 0x62, 0x30, 0x19, 0x8c, 0x4c, 0x60, 0x00, 0x00,
+    0x7c, 0x31, 0x86, 0x3e, 0x00, 0x88, 0x44, 0x63, 0x62, 0x20, 0x19, 0x88, 0x48, 0x60, 0x00, 0x00,
+    0x3c, 0x21, 0x86, 0x3c, 0x00, 0x88, 0x44, 0x7f, 0x66, 0x20, 0xf9, 0x8f, 0xe8, 0x60, 0x00, 0x00,
+    0x3c, 0x03, 0xc2, 0x3c, 0x00, 0x88, 0x44, 0x40, 0x3c, 0x21, 0x19, 0x88, 0x08, 0x60, 0x00, 0x00,
+    0x1f, 0xff, 0xff, 0xf8, 0x00, 0x88, 0x44, 0x61, 0x20, 0x23, 0x19, 0x8c, 0x0c, 0x60, 0x00, 0x00,
+    0x1f, 0xff, 0xff, 0xf8, 0x00, 0x88, 0x47, 0x33, 0x3e, 0x23, 0x38, 0xe6, 0xce, 0xe6, 0x80, 0x00,
+    0x0f, 0xff, 0xff, 0xf0, 0x00, 0x88, 0x43, 0x1c, 0x63, 0x21, 0xc8, 0xe3, 0x83, 0x27, 0x80, 0x00,
+    0x07, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+// 'Batery_H_Maxim_plug2'
+const uint8_t  battChrging [] = {
+    // 'Batery_H_Maxim_plug2'
+    0x7f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x08, 0x80, 0x00, 0xe0, 0x00, 0x80, 0x07, 0xe0, 0x00,
+    0x80, 0x0f, 0xfe, 0x06, 0x87, 0xff, 0xfe, 0x06, 0x87, 0xff, 0xfe, 0x06, 0x87, 0xff, 0xe0, 0x06,
+    0x87, 0xff, 0xe0, 0x06, 0x87, 0xff, 0xff, 0x06, 0x87, 0xff, 0xff, 0x06, 0x80, 0x07, 0xfe, 0x06,
+    0x80, 0x03, 0xe0, 0x00, 0x80, 0x00, 0x60, 0x00, 0x80, 0x00, 0x00, 0x08, 0x7f, 0xff, 0xff, 0xf0,
+};
+
+// 'Batery_H_Maxim_100'
+const uint8_t battFull [] = {
+    // 'Batery_H_Maxim_100'
+    0x7f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x08, 0x9e, 0x78, 0xf1, 0xe0, 0xbe, 0x7c, 0xf3, 0xe0,
+    0xbe, 0x7c, 0xf3, 0xe6, 0xbe, 0x7c, 0xf3, 0xe6, 0xbe, 0x7c, 0xf3, 0xe6, 0xbe, 0x7c, 0xf3, 0xe6,
+    0xbe, 0x7c, 0xf3, 0xe6, 0xbe, 0x7c, 0xf3, 0xe6, 0xbe, 0x7c, 0xf3, 0xe6, 0xbe, 0x7c, 0xf3, 0xe6,
+    0xbe, 0x7c, 0xf3, 0xe0, 0x9e, 0x78, 0xf1, 0xe0, 0x80, 0x00, 0x00, 0x08, 0x7f, 0xff, 0xff, 0xf0,
+};
+
+const uint8_t batt75 [] = {
+    // 'Batery_H_Maxim_75'
+    0x7f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x08, 0x9e, 0x78, 0xf0, 0x00, 0xbe, 0x7c, 0xf0, 0x00,
+    0xbe, 0x7c, 0xf0, 0x06, 0xbe, 0x7c, 0xf0, 0x06, 0xbe, 0x7c, 0xf0, 0x06, 0xbe, 0x7c, 0xf0, 0x06,
+    0xbe, 0x7c, 0xf0, 0x06, 0xbe, 0x7c, 0xf0, 0x06, 0xbe, 0x7c, 0xf0, 0x06, 0xbe, 0x7c, 0xf0, 0x06,
+    0xbe, 0x7c, 0xf0, 0x00, 0x9e, 0x78, 0xf0, 0x00, 0x80, 0x00, 0x00, 0x08, 0x7f, 0xff, 0xff, 0xf0,
+};
+
+const uint8_t batt50 [] = {
+    // 'Batery_H_Maxim_50'
+    0x7f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x08, 0x9e, 0x78, 0x00, 0x00, 0xbe, 0x7c, 0x00, 0x00,
+    0xbe, 0x7c, 0x00, 0x06, 0xbe, 0x7c, 0x00, 0x06, 0xbe, 0x7c, 0x00, 0x06, 0xbe, 0x7c, 0x00, 0x06,
+    0xbe, 0x7c, 0x00, 0x06, 0xbe, 0x7c, 0x00, 0x06, 0xbe, 0x7c, 0x00, 0x06, 0xbe, 0x7c, 0x00, 0x06,
+    0xbe, 0x7c, 0x00, 0x00, 0x9e, 0x78, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x7f, 0xff, 0xff, 0xf0,
+};
+
+const uint8_t batt25 [] = {
+    // 'Batery_H_Maxim_25'
+    0x7f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x08, 0x9e, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0x00, 0x06, 0xbe, 0x00, 0x00, 0x06, 0xbe, 0x00, 0x00, 0x06, 0xbe, 0x00, 0x00, 0x06,
+    0xbe, 0x00, 0x00, 0x06, 0xbe, 0x00, 0x00, 0x06, 0xbe, 0x00, 0x00, 0x06, 0xbe, 0x00, 0x00, 0x06,
+    0xbe, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x7f, 0xff, 0xff, 0xf0,
+};
+
+const uint8_t battEmpty [] = {
+    // 'Batery_H_Maxim_empty'
+    0x7f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x08, 0x82, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00,
+    0xa2, 0x00, 0x00, 0x06, 0xa2, 0x00, 0x00, 0x06, 0xa2, 0x00, 0x00, 0x06, 0xa2, 0x00, 0x00, 0x06,
+    0xa2, 0x00, 0x00, 0x06, 0xa2, 0x00, 0x00, 0x06, 0xa2, 0x00, 0x00, 0x06, 0xa2, 0x00, 0x00, 0x06,
+    0xa2, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x7f, 0xff, 0xff, 0xf0,
+};
+
+
+
+ // 'maxim-integrated-squarelogo'
+const uint8_t squareMaxim []= {
+    0x00, 0x03, 0xc0, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x80, 
+    0x03, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xf8, 
+    0x1e, 0x03, 0xc0, 0x78, 0x3e, 0x03, 0xc0, 0x7c, 0x3e, 0x01, 0x80, 0x7c, 0x3e, 0x31, 0x8c, 0x7c, 
+    0x7e, 0x31, 0x0c, 0x7e, 0x7e, 0x3b, 0x1c, 0x7e, 0x7e, 0x3e, 0x3c, 0x7e, 0x7e, 0x3c, 0x3c, 0x7e, 
+    0x7e, 0x3c, 0x3c, 0x7e, 0x7e, 0x38, 0x1c, 0x7e, 0x3e, 0x38, 0x1c, 0x7c, 0x3e, 0x30, 0x0c, 0x7c, 
+    0x3e, 0x31, 0x8c, 0x7c, 0x1e, 0x21, 0x84, 0x78, 0x1e, 0x23, 0xc4, 0x78, 0x0f, 0xff, 0xff, 0xf0, 
+    0x0f, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0x00, 
+    0x00, 0x7f, 0xfe, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+
+ // 'maxim-integrated-squarelogo-small'
+const uint8_t squareMaximSmall [] = {
+    0x03, 0xc0, 0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x61, 0x86, 0x60, 0x06, 0x65, 0x26, 0x66, 0x66, 
+    0x66, 0x66, 0x64, 0x26, 0x65, 0xa6, 0x3f, 0xfc, 0x3f, 0xfc, 0x1f, 0xf8, 0x07, 0xe0, 0x00, 0x00
+};