Class to manage hardware interface with HX8357 chipset.
More...
#include <Adafruit_HX8357.h>
|
| | Adafruit_HX8357 (int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST, int8_t _MISO, uint8_t type=HX8357D) |
| | Constructor for Adafruit_HX8357 displays, using software (bitbang) SPI. More...
|
| |
| | Adafruit_HX8357 (int8_t _CS, int8_t _DC, int8_t _RST=-1, uint8_t type=HX8357D) |
| | Constructor for Adafruit_HX8357 displays, using the default hardware SPI interface. More...
|
| |
| | Adafruit_HX8357 (SPIClass *spi, int8_t _CS, int8_t _DC, int8_t _RST=-1, uint8_t type=HX8357D) |
| | Constructor for Adafruit_HX8357 displays, using an arbitrary SPI interface. More...
|
| |
| | Adafruit_HX8357 (tftBusWidth busWidth, int8_t d0, int8_t wr, int8_t dc, int8_t cs=-1, int8_t rst=-1, int8_t rd=-1) |
| | Constructor for Adafruit_HX8357 displays, using parallel interface. More...
|
| |
| | ~Adafruit_HX8357 (void) |
| | Destructor for Adafruit_HX8357 object. More...
|
| |
| void | begin (uint32_t freq=0) |
| | Initialize HX8357 chip. Connects to the HX8357 over SPI and sends initialization commands. More...
|
| |
| void | setRotation (uint8_t r) |
| | Set origin of (0,0) and orientation of TFT display. More...
|
| |
| void | invertDisplay (boolean i) |
| | Enable/Disable display color inversion. More...
|
| |
| void | setAddrWindow (uint16_t x, uint16_t y, uint16_t w, uint16_t h) |
| | Set the "address window" - the rectangle we will write to graphics RAM with the next chunk of SPI data writes. The HX8357 will automatically wrap the data as each row is filled. More...
|
| |
Class to manage hardware interface with HX8357 chipset.
◆ Adafruit_HX8357() [1/4]
| Adafruit_HX8357::Adafruit_HX8357 |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
mosi, |
|
|
int8_t |
sclk, |
|
|
int8_t |
rst, |
|
|
int8_t |
miso, |
|
|
uint8_t |
type = HX8357D |
|
) |
| |
Constructor for Adafruit_HX8357 displays, using software (bitbang) SPI.
- Parameters
-
| cs | Chip select pin (using Arduino pin numbering). |
| dc | Data/Command pin (using Arduino pin numbering). |
| mosi | SPI MOSI pin (using Arduino pin numbering). |
| sclk | SPI Clock pin (using Arduino pin numbering). |
| rst | Reset pin (Arduino pin numbering, optional, pass -1 if unused). |
| miso | SPI MISO pin (Arduino pin #, optional, pass -1 if unused). |
| type | Display type, HX8357D (default if unspecified) or HX8357B. |
- Returns
- Adafruit_HX8357 object.
- Note
- Call the object's begin() function before use.
◆ Adafruit_HX8357() [2/4]
| Adafruit_HX8357::Adafruit_HX8357 |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst = -1, |
|
|
uint8_t |
type = HX8357D |
|
) |
| |
Constructor for Adafruit_HX8357 displays, using the default hardware SPI interface.
- Parameters
-
| cs | Chip select pin (using Arduino pin numbering). |
| dc | Data/Command pin (using Arduino pin numbering). |
| rst | Reset pin (Arduino pin numbering, optional, pass -1 if unused). |
| type | Display type, HX8357D (default if unspecified) or HX8357B. |
- Returns
- Adafruit_HX8357 object.
- Note
- Call the object's begin() function before use.
◆ Adafruit_HX8357() [3/4]
| Adafruit_HX8357::Adafruit_HX8357 |
( |
SPIClass * |
spi, |
|
|
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst = -1, |
|
|
uint8_t |
type = HX8357D |
|
) |
| |
Constructor for Adafruit_HX8357 displays, using an arbitrary SPI interface.
- Parameters
-
| spi | SPI peripheral to use. |
| cs | Chip select pin (using Arduino pin numbering). |
| dc | Data/Command pin (using Arduino pin numbering). |
| rst | Reset pin (Arduino pin numbering, optional, pass -1 if unused). |
| type | Display type, HX8357D (default if unspecified) or HX8357B. |
- Returns
- Adafruit_HX8357 object.
- Note
- Call the object's begin() function before use.
◆ Adafruit_HX8357() [4/4]
| Adafruit_HX8357::Adafruit_HX8357 |
( |
tftBusWidth |
busWidth, |
|
|
int8_t |
d0, |
|
|
int8_t |
wr, |
|
|
int8_t |
dc, |
|
|
int8_t |
cs = -1, |
|
|
int8_t |
rst = -1, |
|
|
int8_t |
rd = -1 |
|
) |
| |
Constructor for Adafruit_HX8357 displays, using parallel interface.
- Parameters
-
| busWidth | If tft16 (enumeration in Adafruit_SPITFT.h), is a 16-bit interface, else 8-bit. |
| d0 | Data pin 0 (MUST be a byte- or word-aligned LSB of a PORT register – pins 1-n are extrapolated from this). |
| wr | Write strobe pin # (required). |
| dc | Data/Command pin # (required). |
| cs | Chip select pin # (optional, pass -1 if unused and CS is tied to GND). |
| rst | Reset pin # (optional, pass -1 if unused). |
| rd | Read strobe pin # (optional, pass -1 if unused). |
◆ ~Adafruit_HX8357()
| Adafruit_HX8357::~Adafruit_HX8357 |
( |
void |
| ) |
|
◆ begin()
| void Adafruit_HX8357::begin |
( |
uint32_t |
freq = 0 | ) |
|
Initialize HX8357 chip. Connects to the HX8357 over SPI and sends initialization commands.
- Parameters
-
| freq | SPI bitrate – default of 0 will use a (usually) platform- optimized value, e.g. 8 MHz on AVR, 12 MHz on M0. |
- Returns
- None (void).
◆ setRotation()
| void Adafruit_HX8357::setRotation |
( |
uint8_t |
m | ) |
|
Set origin of (0,0) and orientation of TFT display.
- Parameters
-
| m | The index for rotation, from 0-3 inclusive |
- Returns
- None (void).
◆ invertDisplay()
| void Adafruit_HX8357::invertDisplay |
( |
boolean |
invert | ) |
|
Enable/Disable display color inversion.
- Parameters
-
| invert | True to invert display, False for normal color. |
- Returns
- None (void).
◆ setAddrWindow()
| void Adafruit_HX8357::setAddrWindow |
( |
uint16_t |
x1, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
Set the "address window" - the rectangle we will write to graphics RAM with the next chunk of SPI data writes. The HX8357 will automatically wrap the data as each row is filled.
- Parameters
-
| x1 | Leftmost column of rectangle (screen pixel coordinates). |
| y1 | Topmost row of rectangle (screen pixel coordinates). |
| w | Width of rectangle. |
| h | Height of rectangle. |
- Returns
- None (void).
The documentation for this class was generated from the following files: