|
Adafruit Library
|
Driver for ST7789-based TFT displays. More...
#include <dispDrvSt7789.h>
Public Member Functions | |
| dispDrvSt7789 (int16_t cs, int16_t dc, int16_t mosi, int16_t sck, int16_t rst=-1, int16_t miso=-1) | |
| Constructor for the ST7789 display driver. More... | |
| ~dispDrvSt7789 () | |
| Destructor for the ST7789 display driver. | |
| bool | begin () override |
| Attempts to initialize the ST7789 TFT driver. More... | |
| void | drawBatteryIcon (uint8_t bat) override |
| Draws the battery icon based on the current battery level. More... | |
| void | showSplash () override |
| Displays the splash screen on the display. | |
| virtual void | drawStatusBar (const char *io_username) override |
| Draws a status bar at the top of the display. More... | |
| void | updateStatusBar (int8_t rssi, uint8_t bat, bool mqtt_status) override |
| Updates the status bar with current information (battery level, connectivity status, etc). More... | |
| virtual void | writeMessage (const char *message) override |
| Writes a message to the display. More... | |
Public Member Functions inherited from dispDrvBase | |
| 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... | |
| 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... | |
Static Public Member Functions | |
| static const unsigned char * | batteryIcon (uint8_t bat) |
| Selects the battery icon for a battery level. More... | |
Additional Inherited Members | |
Protected Attributes inherited from dispDrvBase | |
| int16_t | _pin_dc |
| Data/Command pin. | |
| int16_t | _pin_rst |
| Reset pin. | |
| int16_t | _pin_cs |
| Chip Select pin. | |
| int16_t | _pin_busy |
| Optional Busy pin. | |
| int16_t | _pin_sram_cs |
| Optional EPD SRAM chip select pin. | |
| uint16_t | _pin_mosi |
| Optional MOSI pin for SPI TFT displays. | |
| uint16_t | _pin_miso |
| Optional MISO pin for SPI TFT displays. | |
| uint16_t | _pin_sck |
| Optional SCK pin for SPI TFT displays. | |
| uint8_t | _text_sz = 1 |
| Text size for displaying a message. | |
| int16_t | _height |
| Height of the display. | |
| int16_t | _width |
| Width of the display. | |
| uint8_t | _rotation |
| Rotation of the display. | |
| int | _statusbar_icons_y |
| Y position of status bar icons. | |
| int | _statusbar_icon_battery_x |
| X position of battery icon. | |
| int | _statusbar_icon_wifi_x |
| X position of WiFi icon. | |
| int | _statusbar_icon_cloud_x |
| X position of cloud icon. | |
| int8_t | _statusbar_rssi |
| RSSI value for status bar. | |
| uint8_t | _statusbar_bat = 100 |
| Battery level (%) for the status bar. | |
| bool | _statusbar_mqtt_connected |
| MQTT connection status for the status bar. | |
Driver for ST7789-based TFT displays.
|
inline |
Constructor for the ST7789 display driver.
| 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. |
|
inlineoverridevirtual |
Attempts to initialize the ST7789 TFT driver.
Reimplemented from dispDrvBase.
|
inlinestatic |
Selects the battery icon for a battery level.
| bat | The battery level as a percentage (0-100). |
|
inlineoverridevirtual |
Draws the battery icon based on the current battery level.
| bat | The current battery level as a percentage (0-100). |
Reimplemented from dispDrvBase.
|
inlineoverridevirtual |
Draws a status bar at the top of the display.
| io_username | The Adafruit IO username to display on the status bar. |
Reimplemented from dispDrvBase.
|
inlineoverridevirtual |
Updates the status bar with current information (battery level, connectivity status, etc).
| 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. |
Reimplemented from dispDrvBase.
|
inlineoverridevirtual |
Writes a message to the display.
| message | The message to write to the display. |
Implements dispDrvBase.
1.8.13