A derived version of the BSD licensed Adafrut GFX library for the SSD1351 controller for an OLED 128x 96or 128x128 display using SPI

Fork of Adafruit_GFX by Neal Horman

/media/uploads/Dzhafarkhanov/1673-09.jpg

You can print russian. (font edited).

class SPIPreInit : public SPI { public: SPIPreInit(PinName mosi, PinName miso, PinName clk) : SPI(mosi,miso,clk) { format(8,3); frequency(25000000); }; }; SPIPreInit gSpi(PB_15,NC,PB_13); PinName mosi(sda), PinName miso, PinName clk(scl) Adafruit_SSD1351_Spi oled(gSpi,PB_14,PB_1,PB_2); PinName DC, PinName RST, PinName CS

Revision:
17:56015e4834e6
Parent:
14:edb3c36aa1a7
--- a/Adafruit_GFX.h	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_GFX.h	Wed Feb 24 12:24:42 2016 +0000
@@ -34,17 +34,11 @@
 #define _BV(bit) (1<<(bit))
 #endif
 
-#define BLACK 0
-#define WHITE 1
-
 /**
  * This is a Text and Graphics element drawing class.
  * These functions draw to the display buffer.
  *
- * Display drivers should be derived from here.
- * The Display drivers push the display buffer to the
- * hardware based on application control.
- *
+
  */
 class Adafruit_GFX : public Stream
 {
@@ -56,8 +50,8 @@
         , _height(h)
         , cursor_x(0)
         , cursor_y(0)
-        , textcolor(WHITE)
-        , textbgcolor(BLACK)
+        , textcolor(0xFFFF)
+        , textbgcolor(0xFFFF)
         , textsize(1)
         , rotation(0)
         , wrap(true)