5#ifndef ADAFRUIT_TFT_DRIVER_H
6#define ADAFRUIT_TFT_DRIVER_H
8#include <Adafruit_ST7735.h>
TFTColor
A color used for drawing on a TFT display.
Definition TFT.h:14
unsigned getScreenHeight() const override
Returns the height, in pixels, of the screen.
Definition AdafruitTFTDriver.cpp:19
static constexpr unsigned TEXT_SCALE
Definition AdafruitTFTDriver.h:45
unsigned getTextWidth() const override
Returns the width, in pixels, of one character.
Definition AdafruitTFTDriver.cpp:23
void clearScreen(TFTColor color) override
Assigns one color to all pixels on the screen, clearing any previously drawn text.
Definition AdafruitTFTDriver.cpp:31
Adafruit_ST7735 m_gfx
Definition AdafruitTFTDriver.h:64
static constexpr unsigned DEFAULT_TEXT_HEIGHT
Definition AdafruitTFTDriver.h:56
static Color565 encodeColor(TFTColor color)
Converts an abstract color to the representation used by the Adafruit ST7735 library.
Definition AdafruitTFTDriver.cpp:45
static constexpr unsigned SCREEN_ORIENTATION
Definition AdafruitTFTDriver.h:50
static constexpr unsigned DEFAULT_TEXT_WIDTH
Definition AdafruitTFTDriver.h:55
AdafruitTFTDriver(int csPin, int dcPin)
Instantiate the Adafruit driver using hardware SPI.
Definition AdafruitTFTDriver.cpp:4
void initialize() override
Initializes the display.
Definition AdafruitTFTDriver.cpp:9
void drawText(TFTPoint topLeft, TFTColor textColor, TFTColor bgColor, const char *string) override
Draws monospace text.
Definition AdafruitTFTDriver.cpp:35
unsigned getTextHeight() const override
Returns the height, in pixels, of one character.
Definition AdafruitTFTDriver.cpp:27
static constexpr uint8_t DISPLAY_REVISION
Definition AdafruitTFTDriver.h:42
unsigned getScreenWidth() const override
Returns the width, in pixels, of the screen.
Definition AdafruitTFTDriver.cpp:15
uint16_t Color565
Definition AdafruitTFTDriver.h:39
A low-level interface to a TFT display.
Definition TFTDriver.h:13
The position of a pixel on a TFT display, given in Cartesian coordinates.
Definition TFT.h:27