SSD1331 Oled driver library for 96x64 colour Oled display. Demo included in .h file
Dependents: Oled-SSD1331 PJ12_device
Revision 5:4385fd242db0, committed 2016-05-29
- Comitter:
- star297
- Date:
- Sun May 29 17:59:51 2016 +0000
- Parent:
- 4:062b4708eb35
- Commit message:
- Minor update
Changed in this revision
ssd1331.cpp | Show annotated file Show diff for this revision Revisions of this file |
ssd1331.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 062b4708eb35 -r 4385fd242db0 ssd1331.cpp --- a/ssd1331.cpp Wed May 18 22:16:21 2016 +0000 +++ b/ssd1331.cpp Sun May 29 17:59:51 2016 +0000 @@ -459,8 +459,8 @@ void ssd1331::Bitmap16(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *bitmap) { - unsigned int i,j; - int padd; + int8_t i,j; + int8_t padd; unsigned short *bitmap_ptr = (unsigned short *)bitmap; window(x, y, w, h);
diff -r 062b4708eb35 -r 4385fd242db0 ssd1331.h --- a/ssd1331.h Wed May 18 22:16:21 2016 +0000 +++ b/ssd1331.h Sun May 29 17:59:51 2016 +0000 @@ -149,7 +149,8 @@ public: // constructor ssd1331(PinName cs_pin, PinName rst_pin, PinName a0_pin, PinName mosi_pin, PinName miso_pin, PinName sclk_pin); - + + void Init(void); void pixel(uint8_t x,uint8_t y, uint16_t color); // place a pixel x,y coordinates, color void rect(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint16_t colorline); // draw rectangle, start x,y end x,y, color void fillrect(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint16_t colorline,uint16_t colorfill); // fill rectangle start x,y, end x,y, outline color, fill color. @@ -192,7 +193,6 @@ virtual int _putc(int c); virtual int _getc(); private: - void Init(void); void RegWrite(unsigned char Command); void RegWriteM(unsigned char *Command, uint8_t count); void DataWrite(unsigned char c);