Test for STM32F4

Dependents:   Nucleo_SSD1331

Fork of RGB_OLED_SSD1331 by Juergen M

Revision:
8:ff74bd4d94d6
Parent:
4:1707ca53e7d5
Child:
10:ef7440718431
--- a/include/SGL.h	Sun Nov 15 23:07:48 2015 +0000
+++ b/include/SGL.h	Tue Nov 17 08:43:15 2015 +0000
@@ -143,29 +143,29 @@
 class SGL {
  
 public:
-    SGL(uint16_t width, uint16_t height);
+    SGL(uint8_t width, uint8_t height);
     virtual void drawPixel(uint8_t x, uint8_t y, uint16_t color) = 0; // implemented by subclass
     virtual void drawLine(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint16_t color);
-    virtual void drawVerticalLine(uint16_t x, uint16_t y, uint16_t height,uint16_t color);
-    virtual void drawHorizontalLine(uint16_t x, uint16_t y, uint16_t width, uint16_t color);
-    virtual void drawRectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
-    virtual void fillRectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
-    virtual void drawCircle(uint16_t x, uint16_t y, uint16_t r, uint16_t color);
-    virtual void fillCircle(uint16_t x, uint16_t y, uint16_t r, uint16_t color);
-    virtual void drawTraingle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);
-    virtual void fillTraingle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);    
-    virtual void drawChar(uint8_t ascii, uint16_t x, uint16_t y, uint16_t size, uint16_t color);
-    virtual void drawString(char *string, uint16_t x, uint16_t y, uint16_t size, uint16_t color);
-    virtual void drawBitMap(uint16_t x, uint16_t y, const uint8_t *bitmap, uint16_t width, int16_t height, uint16_t color);
+    virtual void drawVLine(uint8_t x, uint8_t y, uint8_t length,uint16_t color);
+    virtual void drawHLine(uint8_t x, uint8_t y, uint8_t length, uint16_t color);
+    virtual void drawRect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t color);
+    virtual void fillRect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t color);
+    virtual void drawCircle(uint8_t x, uint8_t y, uint8_t r, uint16_t color);
+    virtual void fillCircle(uint8_t x, uint8_t y, uint8_t r, uint16_t color);
+    virtual void drawTraingle(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint16_t color);
+    virtual void fillTraingle(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint16_t color);    
+    virtual void drawChar(uint8_t ascii, uint8_t x, uint8_t y, uint8_t size, uint16_t color);
+    virtual void drawString(char *string, uint8_t x, uint8_t y, uint8_t size, uint16_t color);
+    virtual void drawBitMap(uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t width, uint8_t height, uint16_t color);
     virtual void fillScreen(uint16_t color);
     
 private:
-    void swap(uint16_t* a, uint16_t* b){ 
-        uint16_t t = *a; *a = *b; *b = t; 
+    void swap(uint8_t* a, uint8_t* b){ 
+        uint8_t t = *a; *a = *b; *b = t; 
     };
     
-    uint16_t _width;
-    uint16_t _height;
+    uint8_t _width;
+    uint8_t _height;
 };
 
 #endif