Driver for the ILI9341 display.
More...
Driver for the ILI9341 display.
|
int | ili9341_init (ili9341_t *dev, const ili9341_params_t *params) |
| Setup an ili9341 display device. More...
|
|
void | ili9341_fill (const ili9341_t *dev, uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, uint16_t color) |
| Fill a rectangular area with a single pixel color. More...
|
|
void | ili9341_pixmap (const ili9341_t *dev, uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_t *color) |
| Fill a rectangular area with an array of pixels. More...
|
|
void | ili9341_write_cmd (const ili9341_t *dev, uint8_t cmd, const uint8_t *data, size_t len) |
| Raw write command. More...
|
|
void | ili9341_read_cmd (const ili9341_t *dev, uint8_t cmd, uint8_t *data, size_t len) |
| Raw read command. More...
|
|
void | ili9341_invert_on (const ili9341_t *dev) |
| Invert the display colors. More...
|
|
void | ili9341_invert_off (const ili9341_t *dev) |
| Disable color inversion. More...
|
|
◆ ili9341_fill()
void ili9341_fill |
( |
const ili9341_t * |
dev, |
|
|
uint16_t |
x1, |
|
|
uint16_t |
x2, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
y2, |
|
|
uint16_t |
color |
|
) |
| |
Fill a rectangular area with a single pixel color.
the rectangular area is defined as x1 being the first column of pixels and x2 being the last column of pixels to fill. similar to that, y1 is the first row to fill and y2 is the last row to fill.
- Parameters
-
[in] | dev | device descriptor |
[in] | x1 | x coordinate of the first corner |
[in] | x2 | x coordinate of the opposite corner |
[in] | y1 | y coordinate of the first corner |
[in] | y2 | y coordinate of the opposite corner |
[in] | color | single color to fill the area with |
◆ ili9341_init()
Setup an ili9341 display device.
- Parameters
-
[out] | dev | device descriptor |
[in] | params | parameters for device initialization |
◆ ili9341_invert_off()
void ili9341_invert_off |
( |
const ili9341_t * |
dev | ) |
|
Disable color inversion.
- Parameters
-
◆ ili9341_invert_on()
void ili9341_invert_on |
( |
const ili9341_t * |
dev | ) |
|
Invert the display colors.
- Parameters
-
◆ ili9341_pixmap()
void ili9341_pixmap |
( |
const ili9341_t * |
dev, |
|
|
uint16_t |
x1, |
|
|
uint16_t |
x2, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
y2, |
|
|
const uint16_t * |
color |
|
) |
| |
Fill a rectangular area with an array of pixels.
the rectangular area is defined as x1 being the first column of pixels and x2 being the last column of pixels to fill. similar to that, y1 is the first row to fill and y2 is the last row to fill.
- Note
color
must have a length equal to (x2 - x1 + 1) * (y2 - y1 + 1)
- Parameters
-
[in] | dev | device descriptor |
[in] | x1 | x coordinate of the first corner |
[in] | x2 | x coordinate of the opposite corner |
[in] | y1 | y coordinate of the first corner |
[in] | y2 | y coordinate of the opposite corner |
[in] | color | array of colors to fill the area with |
◆ ili9341_read_cmd()
void ili9341_read_cmd |
( |
const ili9341_t * |
dev, |
|
|
uint8_t |
cmd, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Raw read command.
- Precondition
- len > 0
- Parameters
-
[in] | dev | device descriptor |
[in] | cmd | command |
[out] | data | data from the device |
[in] | len | length of the returned data |
◆ ili9341_write_cmd()
void ili9341_write_cmd |
( |
const ili9341_t * |
dev, |
|
|
uint8_t |
cmd, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Raw write command.
- Parameters
-
[in] | dev | device descriptor |
[in] | cmd | command code |
[in] | data | command data to the device |
[in] | len | length of the command data |