18#ifndef TFT_ESPIDISPLAY_H
19#define TFT_ESPIDISPLAY_H
22#ifndef PIO_UNIT_TESTING
30#define FONT_TFT_ESPI_SMALL &FreeMono9pt7b
31#define FONT_TFT_ESPI_MEDIUM &FreeMono12pt7b
32#define FONT_TFT_ESPI_LARGE &FreeMono18pt7b
33#define FONT_TFT_ESPI_XLARGE &FreeMono24pt7b
34#define FONT_TFT_ESPI_SMALL_SANS &FreeSans9pt7b
35#define FONT_TFT_ESPI_MEDIUM_SANS &FreeSans12pt7b
36#define FONT_TFT_ESPI_LARGE_SANS &FreeSans18pt7b
37#define FONT_TFT_ESPI_XLARGE_SANS &FreeSans24pt7b
38#define FONT_TFT_ESPI_MEDIUM_BOLD &FreeMonoBold12pt7b
39#define FONT_TFT_ESPI_SERIF_BOLD_ITALIC &FreeSerifBoldItalic12pt7b
43#define TEXT_FONT FONT_TFT_ESPI_MEDIUM_BOLD
55 TFT_eSPIDisplay(uint8_t rotation,
const GFXfont *textFont, uint16_t textColour, uint16_t backgroundColour);
63 TFT_eSPIDisplay(uint8_t rotation,
const GFXfont *textFont, uint16_t textColour, uint16_t backgroundColour,
int csPin);
66 void begin()
override;
90 bool append)
override;
107 uint16_t backgroundColour);
117 uint16_t backgroundColour,
int csPin);
132 void _getRowPosition(uint8_t row, uint8_t column, int32_t &x, int32_t &y);
Class to abstract away all physical display implementation to enable multiple display types.
Definition DisplayInterface.h:36
Class for each screen as received from the EXRAIL SCREEN() command Each Screen instance contains a li...
Definition Screen.h:27
Display class for TFT_eSPI based displays.
Definition TFT_eSPIDisplay.h:48
void clearRow(uint8_t row)
Clear the specified row.
Definition TFT_eSPIDisplay.cpp:96
static TFT_eSPIDisplay * create(uint8_t rotation, const GFXfont *textFont, uint16_t textColour, uint16_t backgroundColour)
Static method to enable the compiler to generate create commands from myDevices.h entries.
Definition TFT_eSPIDisplay.cpp:174
static TFT_eSPI * _tft
Definition TFT_eSPIDisplay.h:123
const GFXfont * _gfxFont
Definition TFT_eSPIDisplay.h:124
void displayStartupInfo(const char *version) override
Display the startup screen with software version.
Definition TFT_eSPIDisplay.cpp:105
~TFT_eSPIDisplay() override
Destructor for the TFT_eSPIDisplay.
Definition TFT_eSPIDisplay.cpp:186
TFT_eSPI * getTFT_eSPIInstance()
Get the TFT_eSPI instance created by this instance - needed for the touch interface.
Definition TFT_eSPIDisplay.cpp:167
void begin() override
Perform any initial once off setup or configuration here and call only once.
Definition TFT_eSPIDisplay.cpp:51
void displayScreen(Screen *screen) override
Display the specified Screen on this display.
Definition TFT_eSPIDisplay.cpp:80
bool tftInitialised()
Test if the TFT_eSPI instance has been initialised - needed for the touch interface.
Definition TFT_eSPIDisplay.cpp:172
static bool _tftInitialised
Definition TFT_eSPIDisplay.h:125
virtual void displayFormattedRow(uint8_t row, uint8_t column, RowAttributes attributes, const char *text, bool append) override
Display a row using formatting modifiers.
Definition TFT_eSPIDisplay.cpp:128
void clearScreen() override
Clear the entire screen.
Definition TFT_eSPIDisplay.cpp:75
void _getRowPosition(uint8_t row, uint8_t column, int32_t &x, int32_t &y)
Get the X/Y coordinates to draw the specified row, starting at the specified column.
Definition TFT_eSPIDisplay.cpp:191
Structure for row attributes.
Definition DisplayInterface.h:26