ILI9341 Class
- ID: ili9341
- Name: SPI Based LCD
- Category: display
- Manufacturer: adafruit
- Link: http://www.adafruit.com/product/2090
- Connection: spi
This module defines the interface for the ILI9341 display library

Item Index
Methods
ILI9341
-
csLCD -
csSD -
dc -
rst
Instantiates an ILI9341 object
Parameters:
-
csLCDNumberLCD chip select pin
-
csSDNumberSD card select pin
-
dcNumberData/command pin
-
rstNumberReset pin
Returns:
name
()
String
Returns the name of the component
Returns:
initModule
()
Initializes GPIOs used to talk to the LCD
configModule
()
Configures the LCD driver chip via SPI
setAddrWindow
-
x0 -
y0 -
x1 -
y1
Sets the window size inside the screen where pixel data is written. Concrete implementation from GFX interface.
Parameters:
-
x0NumberFirst coordinate
-
y0NumberFirst coordinate
-
x1NumberSecond coordinate
-
y1NumberSecond coordinate
drawPixel
-
x -
y -
color
Sends a pixel color (RGB) to the driver chip. Concrete implementation from GFX interface.
Parameters:
-
xNumberAxis on the horizontal scale
-
yNumberAxis on the vertical scale
-
colorNumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
drawFastVLine
-
x -
y -
h -
color
Draws a vertical line using minimal SPI writes.
Parameters:
-
xNumberAxis on the horizontal scale to begin line
-
yNumberAxis on the vertical scale to begin line
-
hNumberHeight of line in pixels
-
colorNumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
drawFastHLine
-
x -
y -
w -
color
Draws a horizontal line using minimal SPI writes.
Parameters:
-
xNumberAxis on the horizontal scale to begin line
-
yNumberAxis on the vertical scale to begin line
-
wNumberWidth of line in pixels
-
colorNumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
fillRect
-
x -
y -
w -
h -
color
Draw a filled rectangle.
Parameters:
-
xNumberAxis on the horizontal scale of upper-left corner
-
yNumberAxis on the vertical scale of upper-left corner
-
wNumberWidth of rectangle in pixels
-
hNumberHeight of rectangle in pixels
-
colorNumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
fillScreen
-
color
Fill the screen with a single color.
Parameters:
-
colorNumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
setRotation
-
r
Sets the screen to one of four 90 deg rotations.
Parameters:
-
rNumberRotation setting: 0, 1, 2, 3
invertDisplay
-
i
Invert colors on the display.
Parameters:
-
iBooleanTrue or false to invert colors
color565
-
r -
g -
b
Pass 8-bit R, G, B values and get back 16-bit packed color.
Parameters:
-
rNumberRed color 0-31
-
gNumberGreen color 0-63
-
bNumberblue color 0-31
Returns:
16-bit packed color (RGB) value
executeCMDList
-
addr
Executes a set of commands and data.
Parameters:
-
addrConst uint8_t *Pointer to the start of the commands/data section
writecommand
-
c
Sends a command to the display driver via SPI.
Parameters:
-
cNumberCommand to be written
writedata
-
d
Sends data to the display driver via SPI
Parameters:
-
dNumberData to be written
lcdCSOn
()
Mraa::Result
Set LCD chip select to LOW
Returns:
lcdCSOff
()
Mraa::Result
Set LCD chip select to HIGH
Returns:
sdCSOn
()
Mraa::Result
Set SD card chip select to LOW
Returns:
sdCSOff
()
Mraa::Result
Set SD card chip select to HIGH
Returns:
dcHigh
()
Mraa::Result
Set data/command line to HIGH
Returns:
dcLow
()
Mraa::Result
Set data/command line to LOW
Returns:
rstHigh
()
Mraa::Result
Set reset line to HIGH
Returns:
rstLow
()
Mraa::Result
Set reset line to LOW