Adafruit ssd1331 OLED 96x64 SPI model
Fork of OledLib by
Diff: spioled96x64.cpp
- Revision:
- 5:730724f253a4
- Parent:
- 4:b68843c0269c
- Child:
- 6:7c25a9403243
--- a/spioled96x64.cpp Fri Jan 14 02:49:09 2011 +0000 +++ b/spioled96x64.cpp Fri Jan 14 05:10:02 2011 +0000 @@ -8,7 +8,7 @@ // 任意カラーパターンを描画できるように修正 // Ver1.02 SD1331/1332用 GACcommand対応 // ただし現状ではRectangeしか機能しない模様 - +// Ver1.03 Box (GAC) Color Bug fix #include "mbed.h" #include "spioled96x64.h" @@ -384,12 +384,12 @@ cmd[2] = (unsigned char)y1; cmd[3] = (unsigned char)x2; cmd[4] = (unsigned char)y2; - cmd[5] = (unsigned char)((Color>>11)&0x1f); // Outline Blue - cmd[6] = (unsigned char)((Color>>5 )&0x3f); // Outline Green - cmd[7] = (unsigned char)( Color &0x1f); // Outline Red - cmd[8] = (unsigned char)((Color>>11)&0x1f); // Outline Blue - cmd[9] = (unsigned char)((Color>>5 )&0x3f); // Outline Green - cmd[10]= (unsigned char)( Color &0x1f); // Outline Red + cmd[5] = (unsigned char)(((Color>>11)&0x1f)<<1); // Outline Blue + cmd[6] = (unsigned char) ((Color>>5 )&0x3f); // Outline Green + cmd[7] = (unsigned char)(( Color &0x1f)<<1); // Outline Red + cmd[8] = (unsigned char)(((Color>>11)&0x1f)<<1); // Outline Blue + cmd[9] = (unsigned char) ((Color>>5 )&0x3f); // Outline Green + cmd[10]= (unsigned char)(( Color &0x1f)<<1); // Outline Red RegWriteM(cmd, 11); wait_ms( 1 );