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:
-
csLCD
NumberLCD chip select pin
-
csSD
NumberSD card select pin
-
dc
NumberData/command pin
-
rst
NumberReset 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:
-
x0
NumberFirst coordinate
-
y0
NumberFirst coordinate
-
x1
NumberSecond coordinate
-
y1
NumberSecond coordinate
drawPixel
-
x
-
y
-
color
Sends a pixel color (RGB) to the driver chip. Concrete implementation from GFX interface.
Parameters:
-
x
NumberAxis on the horizontal scale
-
y
NumberAxis on the vertical scale
-
color
NumberRGB (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:
-
x
NumberAxis on the horizontal scale to begin line
-
y
NumberAxis on the vertical scale to begin line
-
h
NumberHeight of line in pixels
-
color
NumberRGB (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:
-
x
NumberAxis on the horizontal scale to begin line
-
y
NumberAxis on the vertical scale to begin line
-
w
NumberWidth of line in pixels
-
color
NumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
fillRect
-
x
-
y
-
w
-
h
-
color
Draw a filled rectangle.
Parameters:
-
x
NumberAxis on the horizontal scale of upper-left corner
-
y
NumberAxis on the vertical scale of upper-left corner
-
w
NumberWidth of rectangle in pixels
-
h
NumberHeight of rectangle in pixels
-
color
NumberRGB (16-bit) color (R[0-4], G[5-10], B[11-15]
fillScreen
-
color
Fill the screen with a single color.
Parameters:
-
color
NumberRGB (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:
-
r
NumberRotation setting: 0, 1, 2, 3
invertDisplay
-
i
Invert colors on the display.
Parameters:
-
i
BooleanTrue or false to invert colors
color565
-
r
-
g
-
b
Pass 8-bit R, G, B values and get back 16-bit packed color.
Parameters:
-
r
NumberRed color 0-31
-
g
NumberGreen color 0-63
-
b
Numberblue color 0-31
Returns:
16-bit packed color (RGB) value
executeCMDList
-
addr
Executes a set of commands and data.
Parameters:
-
addr
Const uint8_t *Pointer to the start of the commands/data section
writecommand
-
c
Sends a command to the display driver via SPI.
Parameters:
-
c
NumberCommand to be written
writedata
-
d
Sends data to the display driver via SPI
Parameters:
-
d
NumberData 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