Abstract base class for display drivers. This class provides a common interface for all display drivers, allowing them to be used interchangeably.
More...
#include <dispDrvBase.h>
|
| | dispDrvBase (int16_t dc, int16_t rst, int16_t cs, int16_t sram_cs=-1, int16_t busy=-1) |
| | Constructor for the base display driver for E-Ink displays. More...
|
| |
| | dispDrvBase (int8_t cs, int8_t dc, int8_t mosi, int8_t sck, int8_t rst=-1, int8_t miso=-1) |
| | Constructor for the base display driver for SPI TFT displays. More...
|
| |
|
virtual | ~dispDrvBase () |
| | Destructor for the base display driver. This destructor is virtual to allow derived classes to clean up resources properly.
|
| |
| virtual bool | begin (thinkinkmode_t mode, bool reset=true) |
| | Attempts to initialize a ThinkInk EPD driver. More...
|
| |
| virtual bool | begin () |
| | Attempts to initialize a SPI TFT driver. More...
|
| |
| virtual void | writeMessage (const char *message)=0 |
| | Writes a message to the display. More...
|
| |
| void | setWidth (int16_t w) |
| | Sets the width of the display. More...
|
| |
| void | setHeight (int16_t h) |
| | Sets the height of the display. More...
|
| |
| void | setRotation (uint8_t r) |
| | Sets the rotation of the display. More...
|
| |
| virtual void | setTextSize (uint8_t s) |
| | Sets the text size for the display. More...
|
| |
| virtual void | showSplash () |
| | Displays a splash screen on the display. More...
|
| |
| virtual void | drawStatusBar (const char *io_username) |
| | Draws a status bar at the top of the display. More...
|
| |
| virtual void | drawBatteryIcon (uint8_t bat) |
| | Draws the battery icon based on the current battery level. More...
|
| |
| virtual void | updateStatusBar (int8_t rssi, uint8_t bat, bool mqtt_status) |
| | Updates the status bar with current information (battery level, connectivity status, etc). More...
|
| |
Abstract base class for display drivers. This class provides a common interface for all display drivers, allowing them to be used interchangeably.
◆ dispDrvBase() [1/2]
| dispDrvBase::dispDrvBase |
( |
int16_t |
dc, |
|
|
int16_t |
rst, |
|
|
int16_t |
cs, |
|
|
int16_t |
sram_cs = -1, |
|
|
int16_t |
busy = -1 |
|
) |
| |
|
inline |
Constructor for the base display driver for E-Ink displays.
- Parameters
-
| dc | Data/Command pin for the display. |
| rst | Reset pin for the display. |
| cs | Chip Select pin for the display. |
| sram_cs | Optional SRAM Chip Select pin for E-Ink displays that support it. |
| busy | Optional Busy pin for the display. |
◆ dispDrvBase() [2/2]
| dispDrvBase::dispDrvBase |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
mosi, |
|
|
int8_t |
sck, |
|
|
int8_t |
rst = -1, |
|
|
int8_t |
miso = -1 |
|
) |
| |
|
inline |
Constructor for the base display driver for SPI TFT displays.
- Parameters
-
| cs | Chip Select pin for the display. |
| dc | Data/Command pin for the display. |
| mosi | MOSI pin for the display. |
| sck | SCK pin for the display. |
| rst | Optional Reset pin for the display. |
| miso | Optional MISO pin for the display. |
◆ begin() [1/2]
| virtual bool dispDrvBase::begin |
( |
thinkinkmode_t |
mode, |
|
|
bool |
reset = true |
|
) |
| |
|
inlinevirtual |
Attempts to initialize a ThinkInk EPD driver.
- Parameters
-
| mode | The ThinkInk mode to use for the display. |
| reset | Whether to reset the display before initialization. |
- Returns
- True if the display was initialized successfully, false otherwise.
Reimplemented in drvDispThinkInkGrayscale4Eaamfgn, and dispDrvThinkInkGrayscale4T5.
◆ begin() [2/2]
| virtual bool dispDrvBase::begin |
( |
| ) |
|
|
inlinevirtual |
Attempts to initialize a SPI TFT driver.
- Returns
- True if the display was initialized successfully, false otherwise.
Reimplemented in dispDrvSt7789.
◆ writeMessage()
| virtual void dispDrvBase::writeMessage |
( |
const char * |
message | ) |
|
|
pure virtual |
◆ setWidth()
| void dispDrvBase::setWidth |
( |
int16_t |
w | ) |
|
|
inline |
Sets the width of the display.
- Parameters
-
| w | The width of the display in pixels. |
◆ setHeight()
| void dispDrvBase::setHeight |
( |
int16_t |
h | ) |
|
|
inline |
Sets the height of the display.
- Parameters
-
| h | The height of the display in pixels. |
◆ setRotation()
| void dispDrvBase::setRotation |
( |
uint8_t |
r | ) |
|
|
inline |
Sets the rotation of the display.
- Parameters
-
| r | The rotation of the display (0-3). |
◆ setTextSize()
| virtual void dispDrvBase::setTextSize |
( |
uint8_t |
s | ) |
|
|
inlinevirtual |
Sets the text size for the display.
- Parameters
-
- Note
- This method can be overridden by derived classes to provide specific functionality.
◆ showSplash()
| virtual void dispDrvBase::showSplash |
( |
| ) |
|
|
inlinevirtual |
◆ drawStatusBar()
| virtual void dispDrvBase::drawStatusBar |
( |
const char * |
io_username | ) |
|
|
inlinevirtual |
◆ drawBatteryIcon()
| virtual void dispDrvBase::drawBatteryIcon |
( |
uint8_t |
bat | ) |
|
|
inlinevirtual |
Draws the battery icon based on the current battery level.
- Parameters
-
| bat | The current battery level as a percentage (0-100). |
- Note
- This method can be overridden by derived classes to provide specific functionality.
Reimplemented in dispDrvSt7789.
◆ updateStatusBar()
| virtual void dispDrvBase::updateStatusBar |
( |
int8_t |
rssi, |
|
|
uint8_t |
bat, |
|
|
bool |
mqtt_status |
|
) |
| |
|
inlinevirtual |
Updates the status bar with current information (battery level, connectivity status, etc).
- Parameters
-
| rssi | The current WiFi RSSI (signal strength) in dB. |
| bat | The current battery level as a percentage (0-100). |
| mqtt_status | The current MQTT connection status. |
- Note
- This method can be overridden by derived classes to provide specific functionality.
Reimplemented in dispDrvSt7789, drvDispThinkInkGrayscale4Eaamfgn, and dispDrvThinkInkGrayscale4T5.
The documentation for this class was generated from the following file: