UniGraphic-Fork for ST7920-LCD-controller and SH1106. Tested with 128x64 LCD with SPI and 128x64-OLED with IIC
Dependents: UniGraphic-St7920-Test AfficheurUTILECO
Fork of UniGraphic by
Fork of the UniGraphic-Library for monochrome LCDs with ST7920 controller and 128x64-IIC-OLED-Display with SH1106-Controller
Had to adapt LCD for following reasons:
- Give access to screenbuffer buffer[] to parent class
- pixel() and pixel_read() as they are hardware-dependent
- added reset-pin to IIC-Interface
GraphicDisplay:: sends buffer to LCD when auto_update is set to true.
Testprogram for ST7920 can be found here:
https://developer.mbed.org/users/charly/code/UniGraphic-St7920-Test/
Diff: Inits/SSD1306.cpp
- Revision:
- 33:f87f06292637
- Parent:
- 17:1dafb896c6f5
- Child:
- 36:668396f861d2
diff -r 9cd6227dc7a6 -r f87f06292637 Inits/SSD1306.cpp --- a/Inits/SSD1306.cpp Mon May 02 22:44:05 2016 +0000 +++ b/Inits/SSD1306.cpp Mon Feb 06 12:29:33 2017 +0000 @@ -56,6 +56,17 @@ set_orientation(1); locate(0,0); } + +SSD1306::SSD1306(proto_t displayproto, int Hz, int address, PinName sda, PinName scl, const char* name , unsigned int LCDSIZE_X, unsigned int LCDSIZE_Y) + : LCD(displayproto, Hz, address, sda, scl, LCDSIZE_X, LCDSIZE_Y, IC_X_SEGS, IC_Y_COMS, name) +{ + init(); + cls(); + set_orientation(1); + locate(0,0); +} + + // reset and init the lcd controller void SSD1306::init() {