displaying on SSD1306, 128x64 pixels OLED

Dependencies:   microbit

Revision:
6:c69f08f464b5
Parent:
4:19da6ea94042
Child:
8:5972683a7190
--- a/OLED.h	Tue Feb 18 15:40:28 2020 +0000
+++ b/OLED.h	Sun Feb 23 01:57:35 2020 +0000
@@ -1,9 +1,12 @@
 #include "MicroBit.h"
 #include <vector>
+#include "stdarg.h"
 #include "cppNorm.h"
+
 #ifndef microbitOLED_OLED
 #define microbitOLED_OLED
 
+
 /**
   * Access to bit 0-7, named  by0 or x, and bit 8-15, named by1 or y 
   * of 16 bit named that16. Can be consructed with either two uint8_t or
@@ -84,62 +87,25 @@
     void drawChar(uint8_t x, uint8_t y, uint8_t chr );
     
     /** 
-      * Write a string at charX, charY position. Afterwards are
+      * Writes a string at charX, charY position. Afterwards are
       * charX, charY set to the new starting point for writting
+      * \n and \r is processed - \n includes \r  functionality
       *
       * @param str to be displayed at (charX, charY).   
       */
-    void write(string str);
-    
-    /**
-      * Write string at x posion 0 of charY. Afterwards are
-      * charX, charY set to the new starting point for writting
-      *
-      * @param str to be displayed at (0, charY).
-      */ 
-    void crwrite(string str);
+    void puts(string str);
     
     /**
-      * Write a string at charX, charY position. Afterwards the
-      * pendingNewline state is set
-      *
-      * @param str to be displayed at (charX, charY).
-      */ 
-    void writeln(string str);
-
-    /** 
-      * Write a number at charX, charY position. Afterwards are
-      * charX, charY set to the new starting point for writting
-      *
-      * @param number to be displayed at (charX, charY).   
+      * printf - the old clasic but don't use \n or \r in format string
+      *  \n and \r is processed - \n includes \r  functionality
       */
-    void write(float number);
-    
-    /**
-      * Write number at x posion 0 of charY. Afterwards are
-      * charX, charY set to the new starting point for writting
-      *
-      * @param number to be displayed at (0, charY).
-      */ 
-    void crwrite(float number);
-
-    /**
-      * Write a string at charX, charY position. Afterwards the
-      * pendingNewline state is set
-      *
-      * @param str to be displayed at (charX, charY).
-      */ 
-    void writeln(float number);
+    uint8_t printf(const char * frmt, ...);   
     
     /**
       * Scroll display one line up. An empty line will arise at bottom.
       */
     void scroll();
     
-    void drawRectangle(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1);
-    void drawShape(vector<uint16> & pixels);
-    void drawLine(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1);
-    void testOLED(MicroBit & uBit);
 };
 #endif