Fork of Adafruit OLED driver to debug integration with RedBear Nano SPI driver
Fork of Adafruit_GFX by
Diff: Adafruit_SSD1306.h
- Revision:
- 20:ddd57008bcbf
- Parent:
- 19:faf5ed3eb799
- Child:
- 21:c7e6b6d6e296
--- a/Adafruit_SSD1306.h Wed Feb 25 22:00:53 2015 +0000 +++ b/Adafruit_SSD1306.h Wed Feb 25 23:43:36 2015 +0000 @@ -103,8 +103,8 @@ */ Adafruit_SSD1306_Spi(SPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128) : Adafruit_SSD1306(RST, rawHieght, rawWidth) - , cs(CS,true) - , dc(DC,false) + , cs(CS,true) // Initialise set + , dc(DC,false)// Initialise clear , mspi(spi) { begin(); @@ -235,15 +235,16 @@ * @param rawHeight - the vertical number of pixels for the display, defaults to 32 * @param rawWidth - the horizonal number of pixels for the display, defaults to 128 */ - Adafruit_SSD1306_nrf(SPIClass *_spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128) + Adafruit_SSD1306_nrf(PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128) : Adafruit_SSD1306(RST, rawHieght, rawWidth) , cs(CS,true) , dc(DC,false) - , mspi(*_spi) + , mspi(NRF_SPI1) { - // begin(); - // splash(); - // display(); + //mspi.begin(P0_8, P0_9, P0_11); + begin(); + splash(); + display(); }; virtual void command(uint8_t c)