An implementation of TFTDriver for the Adafruit 0.96" 160x80 Color TFT Display.
More...
#include <AdafruitTFTDriver.h>
|
| | AdafruitTFTDriver (int csPin, int dcPin) |
| | Instantiate the Adafruit driver using hardware SPI.
|
| void | initialize () override |
| | Initializes the display.
|
| unsigned | getScreenWidth () const override |
| | Returns the width, in pixels, of the screen.
|
| unsigned | getScreenHeight () const override |
| | Returns the height, in pixels, of the screen.
|
| unsigned | getTextWidth () const override |
| | Returns the width, in pixels, of one character.
|
| unsigned | getTextHeight () const override |
| | Returns the height, in pixels, of one character.
|
| void | clearScreen (TFTColor color) override |
| | Assigns one color to all pixels on the screen, clearing any previously drawn text.
|
| void | drawText (TFTPoint topLeft, TFTColor textColor, TFTColor bgColor, const char *string) override |
| | Draws monospace text.
|
An implementation of TFTDriver for the Adafruit 0.96" 160x80 Color TFT Display.
◆ Color565
◆ AdafruitTFTDriver()
| AdafruitTFTDriver::AdafruitTFTDriver |
( |
int | csPin, |
|
|
int | dcPin ) |
Instantiate the Adafruit driver using hardware SPI.
- Parameters
-
| csPin | The SPI chip select pin |
| dcPin | The SPI data/command pin |
◆ clearScreen()
| void AdafruitTFTDriver::clearScreen |
( |
TFTColor | color | ) |
|
|
overridevirtual |
Assigns one color to all pixels on the screen, clearing any previously drawn text.
- Parameters
-
| color | The color to assign. |
Implements TFTDriver.
◆ drawText()
Draws monospace text.
If the text goes off the right edge of the screen, it is wrapped to the next line.
- Parameters
-
| topLeft | The top-left position of the first character. |
| textColor | The text color. |
| bgColor | The background color. |
| string | The NUL-terminated ASCII string to draw. |
Implements TFTDriver.
◆ encodeColor()
Converts an abstract color to the representation used by the Adafruit ST7735 library.
◆ getScreenHeight()
| unsigned AdafruitTFTDriver::getScreenHeight |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Returns the height, in pixels, of the screen.
Implements TFTDriver.
◆ getScreenWidth()
| unsigned AdafruitTFTDriver::getScreenWidth |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Returns the width, in pixels, of the screen.
Implements TFTDriver.
◆ getTextHeight()
| unsigned AdafruitTFTDriver::getTextHeight |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Returns the height, in pixels, of one character.
Implements TFTDriver.
◆ getTextWidth()
| unsigned AdafruitTFTDriver::getTextWidth |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Returns the width, in pixels, of one character.
Implements TFTDriver.
◆ initialize()
| void AdafruitTFTDriver::initialize |
( |
| ) |
|
|
overridevirtual |
Initializes the display.
The display must be initialized before any other functions are called.
Implements TFTDriver.
◆ DEFAULT_TEXT_HEIGHT
| unsigned AdafruitTFTDriver::DEFAULT_TEXT_HEIGHT {8} |
|
staticconstexprprivate |
◆ DEFAULT_TEXT_WIDTH
| unsigned AdafruitTFTDriver::DEFAULT_TEXT_WIDTH {6} |
|
staticconstexprprivate |
◆ DISPLAY_REVISION
| uint8_t AdafruitTFTDriver::DISPLAY_REVISION {INITR_MINI160x80_PLUGIN} |
|
staticconstexprprivate |
◆ m_gfx
| Adafruit_ST7735 AdafruitTFTDriver::m_gfx |
|
private |
◆ SCREEN_ORIENTATION
| unsigned AdafruitTFTDriver::SCREEN_ORIENTATION {1} |
|
staticconstexprprivate |
◆ TEXT_SCALE
| unsigned AdafruitTFTDriver::TEXT_SCALE {2} |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: