Test for STM32F4

Dependents:   Nucleo_SSD1331

Fork of RGB_OLED_SSD1331 by Juergen M

Revision:
7:5250c825c7bb
Parent:
6:06c211302c93
Child:
8:ff74bd4d94d6
--- a/include/SSD1331.h	Sat Nov 14 21:18:26 2015 +0000
+++ b/include/SSD1331.h	Sun Nov 15 23:07:48 2015 +0000
@@ -114,47 +114,33 @@
 #define CMD_SET_PRECHARGE_VOLTAGE           0xBB
 #define CMD_SET_V_VOLTAGE                   0xBE
 
-#define RGB(R,G,B)                  (((R>>3)<<11) | ((G>>2)<<5) | (B>>3))
-
 #define LOW 0
 #define HIGH 1
 
-enum Color{
-    COLOR_BLACK     = RGB(  0,  0,  0), // black
-    COLOR_GREY      = RGB(192,192,192), // grey
-    COLOR_WHITE     = RGB(255,255,255), // white
-    COLOR_RED       = RGB(255,  0,  0), // red
-    COLOR_PINK      = RGB(255,192,203), // pink
-    COLOR_YELLOW    = RGB(255,255,  0), // yellow
-    COLOR_GOLDEN    = RGB(255,215,  0), // golden
-    COLOR_BROWN     = RGB(128, 42, 42), // brown
-    COLOR_BLUE      = RGB(  0,  0,255), // blue
-    COLOR_CYAN      = RGB(  0,255,255), // cyan
-    COLOR_GREEN     = RGB(  0,255,  0), // green
-    COLOR_PURPLE    = RGB(160, 32,240), // purple
+
+/* some 16bit RGB color definitions  */
+enum Color{                                             
+ Black           = 0x0000,      /*   0,   0,   0 */
+ Navy            = 0x000F,      /*   0,   0, 128 */
+ DarkGreen       = 0x03E0,      /*   0, 128,   0 */
+ DarkCyan        = 0x03EF,      /*   0, 128, 128 */
+ Maroon          = 0x7800,      /* 128,   0,   0 */
+ Purple          = 0x780F,      /* 128,   0, 128 */
+ Olive           = 0x7BE0,      /* 128, 128,   0 */
+ LightGrey       = 0xC618,      /* 192, 192, 192 */
+ DarkGrey        = 0x7BEF,      /* 128, 128, 128 */
+ Blue            = 0x001F,      /*   0,   0, 255 */
+ Green           = 0x07E0,      /*   0, 255,   0 */
+ Cyan            = 0x07FF,      /*   0, 255, 255 */
+ Red             = 0xF800,      /* 255,   0,   0 */
+ Magenta         = 0xF81F,      /* 255,   0, 255 */
+ Yellow          = 0xFFE0,      /* 255, 255,   0 */
+ White           = 0xFFFF,      /* 255, 255, 255 */
+ Orange          = 0xFD20,      /* 255, 165,   0 */
+ GreenYellow     = 0xAFE5,      /* 173, 255,  47 */
+ Pink            = 0xF81F
 };
 
-/* some RGB color definitions                                                 */
-#define Black           0x0000      /*   0,   0,   0 */
-#define Navy            0x000F      /*   0,   0, 128 */
-#define DarkGreen       0x03E0      /*   0, 128,   0 */
-#define DarkCyan        0x03EF      /*   0, 128, 128 */
-#define Maroon          0x7800      /* 128,   0,   0 */
-#define Purple          0x780F      /* 128,   0, 128 */
-#define Olive           0x7BE0      /* 128, 128,   0 */
-#define LightGrey       0xC618      /* 192, 192, 192 */
-#define DarkGrey        0x7BEF      /* 128, 128, 128 */
-#define Blue            0x001F      /*   0,   0, 255 */
-#define Green           0x07E0      /*   0, 255,   0 */
-#define Cyan            0x07FF      /*   0, 255, 255 */
-#define Red             0xF800      /* 255,   0,   0 */
-#define Magenta         0xF81F      /* 255,   0, 255 */
-#define Yellow          0xFFE0      /* 255, 255,   0 */
-#define White           0xFFFF      /* 255, 255, 255 */
-#define Orange          0xFD20      /* 255, 165,   0 */
-#define GreenYellow     0xAFE5      /* 173, 255,  47 */
-#define Pink                        0xF81F
-
 enum DisplayMode{
     //reset the above effect and turn the data to ON at the corresponding gray level.
     NormalDisplay   = 0xA4,