A modified version of the GDEP015OC1 library that supports x-or as a color.

Fork of GDEP015OC1 by aconno dev team

Revision:
3:dc7b794b59b7
Parent:
2:1c8f73aa2a16
Child:
4:86114342ce8f
--- a/GDEP015OC1.h	Thu Sep 15 09:19:30 2016 +0000
+++ b/GDEP015OC1.h	Thu Sep 15 12:12:34 2016 +0000
@@ -1,6 +1,12 @@
+/**
+ *  Created by Filip Hormot (f.hormot@gmail.com) on 14/09/16.
+ */
+
 #include "mbed.h"
 
 #define BUFFER_SIZE     5000
+#define FONT_WIDTH         5
+#define FONT_HEIGHT        7
 #define BUSY_STATE         1
 
 class GDEP015OC1 {
@@ -14,6 +20,14 @@
         void write(void);            
         void drawPixel(uint16_t startX, uint16_t startY, bool color);            
         void drawLine(uint16_t startX,  uint16_t startY, uint16_t stopX, uint16_t stopY, bool color);
+        void drawTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, bool color);
+        void drawRectangle(uint16_t startX, uint16_t startY, uint16_t stopX, uint16_t stopY, bool color);
+        void drawCircle(uint16_t startX, uint16_t startY, uint16_t radius, bool color);
+        void fillCircle(uint16_t startX, uint16_t startY, uint16_t radius, bool color);
+        void drawEllipse(uint16_t startX, uint16_t startY, uint16_t width, uint16_t height, bool color);
+        void fillEllipse(uint16_t startX, uint16_t startY, uint16_t width, uint16_t height, bool color);
+        void writeChar(char character, uint16_t startX, uint16_t startY, bool color);
+        void writeString(char *string, uint16_t startX, uint16_t startY, bool color);
     private:
         SPI& _spi;
         DigitalOut _cs;
@@ -21,9 +35,10 @@
         DigitalOut _rst;
         DigitalIn  _busy;
         
+        bool _italic, _bold;
+        
         unsigned char _buffer[BUFFER_SIZE];
          
-    
         void _spiCommand(unsigned char command);            
         void _spiData(unsigned char data);            
         void _init(void);