lv_st7789.h

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

参数:
  • 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)

返回:

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

参数:
  • disp -- display object

  • x -- x offset

  • y -- y offset

void lv_st7789_set_invert(lv_display_t *disp, bool invert)

Set color inversion

参数:
  • disp -- display object

  • invert -- false: normal, true: invert

void lv_st7789_set_gamma_curve(lv_display_t *disp, uint8_t gamma)

Set gamma curve

参数:
  • 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.

参数:
  • disp -- display object

  • cmd_list -- controller and panel-specific commands