Driver for the Seeedstudio RGB OLED module for the xadow M0

Revision:
9:5a7bf0ce8518
Parent:
8:ff74bd4d94d6
Child:
10:ef7440718431
--- a/src/SSD1331.cpp	Tue Nov 17 08:43:15 2015 +0000
+++ b/src/SSD1331.cpp	Tue Nov 17 19:45:22 2015 +0000
@@ -141,7 +141,7 @@
 }
 
 //------------------------------------------------------------------------------------
-void SSD1331::drawFrame(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint16_t outColor, uint16_t fillColor)
+void SSD1331::drawRect(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint16_t outColor, uint16_t fillColor)
 {
     if (x0 >= RGB_OLED_WIDTH)  x0 = RGB_OLED_XMAX;
     if (y0 >= RGB_OLED_HEIGHT) y0 = RGB_OLED_YMAX;
@@ -208,24 +208,24 @@
 //------------------------------------------------------------------------------------
 void SSD1331::fillScreen(uint16_t color)
 {
-    drawFrame(0, 0, RGB_OLED_XMAX, RGB_OLED_YMAX, color, color);         
+    drawRect(0, 0, RGB_OLED_XMAX, RGB_OLED_YMAX, color, color);         
 }
 
 //------------------------------------------------------------------------------------
-void SSD1331::setScolling(ScollingDirection direction, uint8_t rowAddr, uint8_t rowNum, uint8_t timeInterval)
+void SSD1331::setScolling(ScollingDirection direction, uint8_t rowAddr, uint8_t rowNum, ScrollInterval interval)
 {
     uint8_t scolling_horizontal = 0x0;
     uint8_t scolling_vertical = 0x0;
     switch(direction){
-        case Horizontal:
+        case SD_Horizontal:
             scolling_horizontal = 0x01;
             scolling_vertical   = 0x00;
             break;
-        case Vertical:
+        case SD_Vertical:
             scolling_horizontal = 0x00;
             scolling_vertical   = 0x01;
             break;
-        case Diagonal:
+        case SD_Diagonal:
             scolling_horizontal = 0x01;
             scolling_vertical   = 0x01;
             break;
@@ -233,7 +233,7 @@
             break;
     }
     
-    uint8_t cmdBuffer[6] = { CMD_CONTINUOUS_SCROLLING_SETUP, scolling_horizontal, rowAddr, rowNum, scolling_vertical, timeInterval };
+    uint8_t cmdBuffer[6] = { CMD_CONTINUOUS_SCROLLING_SETUP, scolling_horizontal, rowAddr, rowNum, scolling_vertical, interval };
     sendCmd(cmdBuffer, 6); //Send buffer
     sendCmd(CMD_ACTIVE_SCROLLING);
     wait(0.05);  
@@ -255,7 +255,7 @@
 }
 
 //------------------------------------------------------------------------------------
-void SSD1331::setDisplayPower(DisplayPower power)
+void SSD1331::setPowerMode(PowerMode power)
 {
     sendCmd(power);
 }