This class creates a mapping between the Adafruit_SSD1306 display driver and the general display interface used by the Control Surface library. More...
#include <Display/DisplayInterfaces/DisplayInterfaceSSD1306.hpp>
Public Member Functions | |
void | clear () override |
Clear the frame buffer or display. More... | |
void | drawBackground () override=0 |
Draw a custom background. More... | |
void | display () override |
Write the frame buffer to the display. More... | |
void | drawPixel (int16_t x, int16_t y, uint16_t color) override |
Paint a single pixel with the given color. More... | |
void | setTextColor (uint16_t color) override |
Set the text color. More... | |
void | setTextSize (uint8_t size) override |
Set the text size. More... | |
void | setCursor (int16_t x, int16_t y) override |
Set the cursor position. More... | |
size_t | write (uint8_t c) override |
Write a character to the display. More... | |
void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) override |
Draw a line between two points. More... | |
void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) override |
Draw a vertical line. More... | |
void | drawFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color) override |
Draw a horizontal line. More... | |
void | drawXBitmap (int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color) override |
Draw a bitmap to the display. More... | |
virtual void | begin () |
Initialize the display. More... | |
virtual void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
Draw a filled rectangle. More... | |
virtual void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
Draw a circle. More... | |
virtual void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
Draw a disk (filled circle). More... | |
void | enable () |
Enable this display: insert it into the linked list of instances, so it gets updated automatically. More... | |
void | disable () |
Disable this display: remove it from the linked list of instances, so it no longer gets updated automatically. More... | |
bool | isEnabled () |
Check if this display is enabled. More... | |
void | clearAndDrawBackground () |
Clear the frame buffer, and draw the custom background. More... | |
Static Public Member Functions | |
static void | beginAll () |
Initialize all displays. More... | |
Protected Member Functions | |
SSD1306_DisplayInterface (Adafruit_SSD1306 &display) | |
Protected Attributes | |
Adafruit_SSD1306 & | disp |
DisplayInterface * | next |
DisplayInterface * | previous |
Static Private Attributes | |
static DoublyLinkedList< DisplayInterface > | elements |
This class creates a mapping between the Adafruit_SSD1306 display driver and the general display interface used by the Control Surface library.
Definition at line 13 of file DisplayInterfaceSSD1306.hpp.
|
inlineprotected |
Definition at line 15 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Clear the frame buffer or display.
Implements DisplayInterface.
Definition at line 18 of file DisplayInterfaceSSD1306.hpp.
|
overridepure virtual |
Draw a custom background.
Reimplemented from DisplayInterface.
|
inlineoverridevirtual |
Write the frame buffer to the display.
Implements DisplayInterface.
Definition at line 20 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Paint a single pixel with the given color.
Implements DisplayInterface.
Definition at line 22 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Set the text color.
Implements DisplayInterface.
Definition at line 26 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Set the text size.
Implements DisplayInterface.
Definition at line 27 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Set the cursor position.
Implements DisplayInterface.
Definition at line 28 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Write a character to the display.
Implements DisplayInterface.
Definition at line 30 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Draw a line between two points.
Implements DisplayInterface.
Definition at line 32 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Draw a vertical line.
Implements DisplayInterface.
Definition at line 36 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Draw a horizontal line.
Implements DisplayInterface.
Definition at line 40 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Draw a bitmap to the display.
Implements DisplayInterface.
Definition at line 45 of file DisplayInterfaceSSD1306.hpp.
|
virtualinherited |
Initialize the display.
Definition at line 7 of file DisplayInterface.cpp.
|
virtualinherited |
Draw a filled rectangle.
Definition at line 13 of file DisplayInterface.cpp.
|
virtualinherited |
Draw a circle.
Definition at line 19 of file DisplayInterface.cpp.
|
virtualinherited |
Draw a disk (filled circle).
Definition at line 42 of file DisplayInterface.cpp.
|
staticinherited |
|
inlineinherited |
Enable this display: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 86 of file DisplayInterface.hpp.
|
inlineinherited |
Disable this display: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 96 of file DisplayInterface.hpp.
|
inlineinherited |
Check if this display is enabled.
Definition at line 110 of file DisplayInterface.hpp.
|
inlineinherited |
Clear the frame buffer, and draw the custom background.
Definition at line 117 of file DisplayInterface.hpp.
|
protected |
Definition at line 51 of file DisplayInterfaceSSD1306.hpp.
|
staticprivateinherited |
Definition at line 123 of file DisplayInterface.hpp.
|
protectedinherited |
Definition at line 305 of file LinkedList.hpp.
|
protectedinherited |
Definition at line 306 of file LinkedList.hpp.