Subclass of SPITFT for ST77xx displays (lots in common!)
More...
#include <Adafruit_ST77xx.h>
|
| Adafruit_ST77xx (uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST=-1, int8_t _MISO=-1) |
| Instantiate Adafruit ST77XX driver with software SPI. More...
|
|
| Adafruit_ST77xx (uint16_t w, uint16_t h, int8_t CS, int8_t RS, int8_t RST=-1) |
| Instantiate Adafruit ST77XX driver with hardware SPI. More...
|
|
| Adafruit_ST77xx (uint16_t w, uint16_t h, SPIClass *spiClass, int8_t CS, int8_t RS, int8_t RST=-1) |
| Instantiate Adafruit ST77XX driver with selectable hardware SPI. More...
|
|
void | setAddrWindow (uint16_t x, uint16_t y, uint16_t w, uint16_t h) |
| SPI displays set an address window rectangle for blitting pixels. More...
|
|
void | setRotation (uint8_t r) |
| Set origin of (0,0) and orientation of TFT display. More...
|
|
void | enableDisplay (boolean enable) |
| Change whether display is on or off. More...
|
|
void | enableTearing (boolean enable) |
| Change whether TE pin output is on or off. More...
|
|
void | enableSleep (boolean enable) |
| Change whether sleep mode is on or off. More...
|
|
|
void | begin (uint32_t freq=0) |
| Initialize ST77xx chip. Connects to the ST77XX over SPI and sends initialization procedure commands. More...
|
|
void | commonInit (const uint8_t *cmdList) |
| Initialization code common to all ST77XX displays. More...
|
|
void | displayInit (const uint8_t *addr) |
| Companion code to the initiliazation tables. Reads and issues a series of LCD commands stored in PROGMEM byte array. More...
|
|
void | setColRowStart (int8_t col, int8_t row) |
| Set origin of (0,0) of display with offsets. More...
|
|
|
uint8_t | _colstart = 0 |
| Some displays need this changed to offset.
|
|
uint8_t | _rowstart = 0 |
| Some displays need this changed to offset.
|
|
uint8_t | spiMode = SPI_MODE0 |
| Certain display needs MODE3 instead.
|
|
Subclass of SPITFT for ST77xx displays (lots in common!)
◆ Adafruit_ST77xx() [1/3]
Adafruit_ST77xx::Adafruit_ST77xx |
( |
uint16_t |
w, |
|
|
uint16_t |
h, |
|
|
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
mosi, |
|
|
int8_t |
sclk, |
|
|
int8_t |
rst = -1 , |
|
|
int8_t |
miso = -1 |
|
) |
| |
Instantiate Adafruit ST77XX driver with software SPI.
- Parameters
-
w | Display width in pixels at default rotation setting (0) |
h | Display height in pixels at default rotation setting (0) |
cs | Chip select pin # |
dc | Data/Command pin # |
mosi | SPI MOSI pin # |
sclk | SPI Clock pin # |
rst | Reset pin # (optional, pass -1 if unused) |
miso | SPI MISO pin # (optional, pass -1 if unused) |
◆ Adafruit_ST77xx() [2/3]
Adafruit_ST77xx::Adafruit_ST77xx |
( |
uint16_t |
w, |
|
|
uint16_t |
h, |
|
|
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst = -1 |
|
) |
| |
Instantiate Adafruit ST77XX driver with hardware SPI.
- Parameters
-
w | Display width in pixels at default rotation setting (0) |
h | Display height in pixels at default rotation setting (0) |
cs | Chip select pin # |
dc | Data/Command pin # |
rst | Reset pin # (optional, pass -1 if unused) |
◆ Adafruit_ST77xx() [3/3]
Adafruit_ST77xx::Adafruit_ST77xx |
( |
uint16_t |
w, |
|
|
uint16_t |
h, |
|
|
SPIClass * |
spiClass, |
|
|
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst = -1 |
|
) |
| |
Instantiate Adafruit ST77XX driver with selectable hardware SPI.
- Parameters
-
w | Display width in pixels at default rotation setting (0) |
h | Display height in pixels at default rotation setting (0) |
spiClass | A pointer to an SPI device to use (e.g. &SPI1) |
cs | Chip select pin # |
dc | Data/Command pin # |
rst | Reset pin # (optional, pass -1 if unused) |
◆ setAddrWindow()
void Adafruit_ST77xx::setAddrWindow |
( |
uint16_t |
x, |
|
|
uint16_t |
y, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
SPI displays set an address window rectangle for blitting pixels.
- Parameters
-
x | Top left corner x coordinate |
y | Top left corner y coordinate |
w | Width of window |
h | Height of window |
◆ setRotation()
void Adafruit_ST77xx::setRotation |
( |
uint8_t |
m | ) |
|
Set origin of (0,0) and orientation of TFT display.
- Parameters
-
m | The index for rotation, from 0-3 inclusive |
◆ enableDisplay()
void Adafruit_ST77xx::enableDisplay |
( |
boolean |
enable | ) |
|
Change whether display is on or off.
- Parameters
-
enable | True if you want the display ON, false OFF |
◆ enableTearing()
void Adafruit_ST77xx::enableTearing |
( |
boolean |
enable | ) |
|
Change whether TE pin output is on or off.
- Parameters
-
enable | True if you want the TE pin ON, false OFF |
◆ enableSleep()
void Adafruit_ST77xx::enableSleep |
( |
boolean |
enable | ) |
|
Change whether sleep mode is on or off.
- Parameters
-
enable | True if you want sleep mode ON, false OFF |
◆ begin()
void Adafruit_ST77xx::begin |
( |
uint32_t |
freq = 0 | ) |
|
|
protected |
Initialize ST77xx chip. Connects to the ST77XX over SPI and sends initialization procedure commands.
- Parameters
-
freq | Desired SPI clock frequency |
◆ commonInit()
void Adafruit_ST77xx::commonInit |
( |
const uint8_t * |
cmdList | ) |
|
|
protected |
Initialization code common to all ST77XX displays.
- Parameters
-
cmdList | Flash memory array with commands and data to send |
◆ displayInit()
void Adafruit_ST77xx::displayInit |
( |
const uint8_t * |
addr | ) |
|
|
protected |
Companion code to the initiliazation tables. Reads and issues a series of LCD commands stored in PROGMEM byte array.
- Parameters
-
addr | Flash memory array with commands and data to send |
◆ setColRowStart()
void Adafruit_ST77xx::setColRowStart |
( |
int8_t |
col, |
|
|
int8_t |
row |
|
) |
| |
|
protected |
Set origin of (0,0) of display with offsets.
- Parameters
-
col | The offset from 0 for the column address |
row | The offset from 0 for the row address |
The documentation for this class was generated from the following files: