Fork of Adafruit OLED driver to debug integration with RedBear Nano SPI driver
Fork of Adafruit_GFX by
Revision 22:6fc21acc8311, committed 2015-02-26
- Comitter:
- tsh
- Date:
- Thu Feb 26 11:27:37 2015 +0000
- Parent:
- 21:c7e6b6d6e296
- Commit message:
- Constructor only calls begin, doesn't perform any SPI transfers
Changed in this revision
Adafruit_SSD1306.cpp | Show annotated file Show diff for this revision Revisions of this file |
Adafruit_SSD1306.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r c7e6b6d6e296 -r 6fc21acc8311 Adafruit_SSD1306.cpp --- a/Adafruit_SSD1306.cpp Thu Feb 26 00:05:12 2015 +0000 +++ b/Adafruit_SSD1306.cpp Thu Feb 26 11:27:37 2015 +0000 @@ -57,7 +57,10 @@ // bring out of reset rst = 1; // turn on VCC (9V?) -#ifdef NEVER +} + +void Adafruit_SSD1306::configure(uint8_t vccstate) +{ command(SSD1306_DISPLAYOFF); command(SSD1306_SETDISPLAYCLOCKDIV); command(0x80); // the suggested ratio 0x80 @@ -97,7 +100,7 @@ command(SSD1306_NORMALDISPLAY); command(SSD1306_DISPLAYON); - #endif + } // Set a single pixel
diff -r c7e6b6d6e296 -r 6fc21acc8311 Adafruit_SSD1306.h --- a/Adafruit_SSD1306.h Thu Feb 26 00:05:12 2015 +0000 +++ b/Adafruit_SSD1306.h Thu Feb 26 11:27:37 2015 +0000 @@ -59,6 +59,7 @@ }; void begin(uint8_t switchvcc = SSD1306_SWITCHCAPVCC); + void configure(uint8_t switchvcc = SSD1306_SWITCHCAPVCC); // These must be implemented in the derived transport driver virtual void command(uint8_t c) = 0;