Class to manage hardware interface with ILI9341 chipset (also seems to work with ILI9340)
More...
#include <Adafruit_ILI9341.h>
|
| Adafruit_ILI9341 (int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST=-1, int8_t _MISO=-1) |
| Instantiate Adafruit ILI9341 driver with software SPI. More...
|
|
| Adafruit_ILI9341 (int8_t _CS, int8_t _DC, int8_t _RST=-1) |
| Instantiate Adafruit ILI9341 driver with hardware SPI using the default SPI peripheral. More...
|
|
| Adafruit_ILI9341 (SPIClass *spiClass, int8_t dc, int8_t cs=-1, int8_t rst=-1) |
| Instantiate Adafruit ILI9341 driver with hardware SPI using a specific SPI peripheral (not necessarily default). More...
|
|
| Adafruit_ILI9341 (tftBusWidth busWidth, int8_t d0, int8_t wr, int8_t dc, int8_t cs=-1, int8_t rst=-1, int8_t rd=-1) |
| Instantiate Adafruit ILI9341 driver using parallel interface. More...
|
|
void | begin (uint32_t freq=0) |
| Initialize ILI9341 chip Connects to the ILI9341 over SPI and sends initialization procedure commands. More...
|
|
void | setRotation (uint8_t r) |
| Set origin of (0,0) and orientation of TFT display. More...
|
|
void | invertDisplay (bool i) |
| Enable/Disable display color inversion. More...
|
|
void | scrollTo (uint16_t y) |
| Scroll display memory. More...
|
|
void | setScrollMargins (uint16_t top, uint16_t bottom) |
| Set the height of the Top and Bottom Scroll Margins. 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 RAM with the next chunk of SPI data writes. The ILI9341 will automatically wrap the data as each row is filled. More...
|
|
uint8_t | readcommand8 (uint8_t reg, uint8_t index=0) |
| Read 8 bits of data from ILI9341 configuration memory. NOT from RAM! This is highly undocumented/supported, it's really a hack but kinda works? More...
|
|
Class to manage hardware interface with ILI9341 chipset (also seems to work with ILI9340)
◆ Adafruit_ILI9341() [1/4]
Adafruit_ILI9341::Adafruit_ILI9341 |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
mosi, |
|
|
int8_t |
sclk, |
|
|
int8_t |
rst = -1 , |
|
|
int8_t |
miso = -1 |
|
) |
| |
Instantiate Adafruit ILI9341 driver with software SPI.
- Parameters
-
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_ILI9341() [2/4]
Adafruit_ILI9341::Adafruit_ILI9341 |
( |
int8_t |
cs, |
|
|
int8_t |
dc, |
|
|
int8_t |
rst = -1 |
|
) |
| |
Instantiate Adafruit ILI9341 driver with hardware SPI using the default SPI peripheral.
- Parameters
-
cs | Chip select pin # (OK to pass -1 if CS tied to GND). |
dc | Data/Command pin # (required). |
rst | Reset pin # (optional, pass -1 if unused). |
◆ Adafruit_ILI9341() [3/4]
Adafruit_ILI9341::Adafruit_ILI9341 |
( |
SPIClass * |
spiClass, |
|
|
int8_t |
dc, |
|
|
int8_t |
cs = -1 , |
|
|
int8_t |
rst = -1 |
|
) |
| |
Instantiate Adafruit ILI9341 driver with hardware SPI using a specific SPI peripheral (not necessarily default).
- Parameters
-
spiClass | Pointer to SPI peripheral (e.g. &SPI or &SPI1). |
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). |
◆ Adafruit_ILI9341() [4/4]
Adafruit_ILI9341::Adafruit_ILI9341 |
( |
tftBusWidth |
busWidth, |
|
|
int8_t |
d0, |
|
|
int8_t |
wr, |
|
|
int8_t |
dc, |
|
|
int8_t |
cs = -1 , |
|
|
int8_t |
rst = -1 , |
|
|
int8_t |
rd = -1 |
|
) |
| |
Instantiate Adafruit ILI9341 driver 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). |
◆ begin()
void Adafruit_ILI9341::begin |
( |
uint32_t |
freq = 0 | ) |
|
Initialize ILI9341 chip Connects to the ILI9341 over SPI and sends initialization procedure commands.
- Parameters
-
freq | Desired SPI clock frequency |
◆ setRotation()
void Adafruit_ILI9341::setRotation |
( |
uint8_t |
m | ) |
|
Set origin of (0,0) and orientation of TFT display.
- Parameters
-
m | The index for rotation, from 0-3 inclusive |
◆ invertDisplay()
void Adafruit_ILI9341::invertDisplay |
( |
bool |
invert | ) |
|
Enable/Disable display color inversion.
- Parameters
-
invert | True to invert, False to have normal color |
◆ scrollTo()
void Adafruit_ILI9341::scrollTo |
( |
uint16_t |
y | ) |
|
Scroll display memory.
- Parameters
-
y | How many pixels to scroll display by |
◆ setScrollMargins()
void Adafruit_ILI9341::setScrollMargins |
( |
uint16_t |
top, |
|
|
uint16_t |
bottom |
|
) |
| |
Set the height of the Top and Bottom Scroll Margins.
- Parameters
-
top | The height of the Top scroll margin |
bottom | The height of the Bottom scroll margin |
◆ setAddrWindow()
void Adafruit_ILI9341::setAddrWindow |
( |
uint16_t |
x1, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
Set the "address window" - the rectangle we will write to RAM with the next chunk of SPI data writes. The ILI9341 will automatically wrap the data as each row is filled.
- Parameters
-
x1 | TFT memory 'x' origin |
y1 | TFT memory 'y' origin |
w | Width of rectangle |
h | Height of rectangle |
◆ readcommand8()
uint8_t Adafruit_ILI9341::readcommand8 |
( |
uint8_t |
commandByte, |
|
|
uint8_t |
index = 0 |
|
) |
| |
Read 8 bits of data from ILI9341 configuration memory. NOT from RAM! This is highly undocumented/supported, it's really a hack but kinda works?
- Parameters
-
commandByte | The command register to read data from |
index | The byte index into the command to read from |
- Returns
- Unsigned 8-bit data read from ILI9341 register
The documentation for this class was generated from the following files: