Interface for interacting with display hardware (TFT, eInk, OLED, etc.) This class provides methods to initialize, write to, and manage the state of display hardware.
More...
#include <hardware.h>
|
| | DisplayHardware (const char *name) |
| | Constructs a new DisplayHardware object. More...
|
| |
|
| ~DisplayHardware () |
| | Destructor.
|
| |
| const char * | getName () |
| | Gets the name of the display hardware instance. More...
|
| |
| void | setType (wippersnapper_display_v1_DisplayType type) |
| | Sets the hardware's display type. More...
|
| |
| wippersnapper_display_v1_DisplayType | getType () |
| | Gets the hardware's display type. More...
|
| |
| bool | beginEPD (wippersnapper_display_v1_DisplayDriver *driver, wippersnapper_display_v1_EPDConfig *config, wippersnapper_display_v1_EpdSpiConfig *spi_config) |
| | Configures the EPD display with the provided configuration. More...
|
| |
| bool | beginTft (wippersnapper_display_v1_DisplayDriver *driver, wippersnapper_display_v1_TftConfig *config, wippersnapper_display_v1_TftSpiConfig *spi_config) |
| | Attempts to configure and initialize a TFT display. More...
|
| |
|
void | showSplash () |
| | Displays the splash screen on the display.
|
| |
| void | drawStatusBar (const char *io_username) |
| | Draws a status bar at the top of the display. More...
|
| |
| void | updateStatusBar (int8_t rssi, uint8_t bat, bool mqtt_connected) |
| | Updates the status bar with the latest RSSI, battery, and MQTT connection status. More...
|
| |
| void | writeMessage (const char *message) |
| | Writes a message to the display. More...
|
| |
Interface for interacting with display hardware (TFT, eInk, OLED, etc.) This class provides methods to initialize, write to, and manage the state of display hardware.
◆ DisplayHardware()
| DisplayHardware::DisplayHardware |
( |
const char * |
name | ) |
|
Constructs a new DisplayHardware object.
- Parameters
-
| name | The name of the hardware instance. |
◆ getName()
| const char * DisplayHardware::getName |
( |
| ) |
|
Gets the name of the display hardware instance.
- Returns
- The name of the display hardware instance.
◆ setType()
| void DisplayHardware::setType |
( |
wippersnapper_display_v1_DisplayType |
type | ) |
|
Sets the hardware's display type.
- Parameters
-
| type | The display type to set. |
◆ getType()
| wippersnapper_display_v1_DisplayType DisplayHardware::getType |
( |
| ) |
|
Gets the hardware's display type.
- Returns
- The current display type.
◆ beginEPD()
| bool DisplayHardware::beginEPD |
( |
wippersnapper_display_v1_DisplayDriver * |
driver, |
|
|
wippersnapper_display_v1_EPDConfig * |
config, |
|
|
wippersnapper_display_v1_EpdSpiConfig * |
spi_config |
|
) |
| |
Configures the EPD display with the provided configuration.
- Parameters
-
| driver | Pointer to a DisplayDriver enum value. |
| config | Pointer to the EPD configuration structure. |
| spi_config | Pointer to the SPI configuration structure for EPD. |
- Returns
- True if configuration was successful, False otherwise.
◆ beginTft()
| bool DisplayHardware::beginTft |
( |
wippersnapper_display_v1_DisplayDriver * |
driver, |
|
|
wippersnapper_display_v1_TftConfig * |
config, |
|
|
wippersnapper_display_v1_TftSpiConfig * |
spi_config |
|
) |
| |
Attempts to configure and initialize a TFT display.
- Parameters
-
| driver | Pointer to a DisplayDriver enum value. |
| config | Pointer to the TFT configuration structure. |
| spi_config | Pointer to the SPI configuration structure for TFT. |
- Returns
- True if configuration was successful, False otherwise.
◆ drawStatusBar()
| void DisplayHardware::drawStatusBar |
( |
const char * |
io_username | ) |
|
Draws a status bar at the top of the display.
- Parameters
-
| io_username | The Adafruit IO username to display on the status bar. |
◆ updateStatusBar()
| void DisplayHardware::updateStatusBar |
( |
int8_t |
rssi, |
|
|
uint8_t |
bat, |
|
|
bool |
mqtt_connected |
|
) |
| |
Updates the status bar with the latest RSSI, battery, and MQTT connection status.
- Parameters
-
| rssi | The current WiFi RSSI value. |
| bat | The current battery percentage (0-100). |
| mqtt_connected | True if connected to MQTT, False otherwise. |
◆ writeMessage()
| void DisplayHardware::writeMessage |
( |
const char * |
message | ) |
|
Writes a message to the display.
- Parameters
-
| message | The message to display. |
The documentation for this class was generated from the following files: