lv_st7789.h
This driver is just a wrapper around the generic MIPI compatible LCD controller driver
Typedefs
-
typedef lv_lcd_send_cmd_cb_t lv_st7789_send_cmd_cb_t
-
typedef lv_lcd_send_color_cb_t lv_st7789_send_color_cb_t
Functions
-
lv_display_t *lv_st7789_create(uint32_t hor_res, uint32_t ver_res, lv_lcd_flag_t flags, lv_st7789_send_cmd_cb_t send_cmd_cb, lv_st7789_send_color_cb_t send_color_cb)
Create an LCD display with ST7789 driver
- Parameters:
hor_res – horizontal resolution
ver_res – vertical resolution
flags – default configuration settings (mirror, RGB ordering, etc.)
send_cmd – platform-dependent function to send a command to the LCD controller (usually uses polling transfer)
send_color – platform-dependent function to send pixel data to the LCD controller (usually uses DMA transfer: must implement a 'ready' callback)
- Returns:
pointer to the created display
-
void lv_st7789_set_gap(lv_display_t *disp, uint16_t x, uint16_t y)
Set gap, i.e., the offset of the (0,0) pixel in the VRAM
- Parameters:
disp – display object
x – x offset
y – y offset
-
void lv_st7789_set_invert(lv_display_t *disp, bool invert)
Set color inversion
- Parameters:
disp – display object
invert – false: normal, true: invert
-
void lv_st7789_set_gamma_curve(lv_display_t *disp, uint8_t gamma)
Set gamma curve
- Parameters:
disp – display object
gamma – gamma curve
-
void lv_st7789_send_cmd_list(lv_display_t *disp, const uint8_t *cmd_list)
Send list of commands.
- Parameters:
disp – display object
cmd_list – controller and panel-specific commands