Chapter 2. API Reference
Return
• ESP_OK on success
Parameters
• [in] panel: LCD panel handle, which is created by other factory API like
esp_lcd_new_panel_st7789()
esp_err_t esp_lcd_panel_init(esp_lcd_panel_handle_t panel)
Initialize LCD panel.
Note Before calling this function, make sure the LCD panel has finished the reset stage by
esp_lcd_panel_reset().
Return
• ESP_OK on success
Parameters
• [in] panel: LCD panel handle, which is created by other factory API like
esp_lcd_new_panel_st7789()
esp_err_t esp_lcd_panel_del(esp_lcd_panel_handle_t panel)
Deinitialize the LCD panel.
Return
• ESP_OK on success
Parameters
• [in] panel: LCD panel handle, which is created by other factory API like
esp_lcd_new_panel_st7789()
esp_err_t esp_lcd_panel_draw_bitmap(esp_lcd_panel_handle_t panel, int x_start, int y_start, int
x_end, int y_end, const void *color_data)
Draw bitmap on LCD panel.
Return
• ESP_OK on success
Parameters
• [in] panel: LCD panel handle, which is created by other factory API like
esp_lcd_new_panel_st7789()
• [in] x_start: Start index on x-axis (x_start included)
• [in] y_start: Start index on y-axis (y_start included)
• [in] x_end: End index on x-axis (x_end not included)
• [in] y_end: End index on y-axis (y_end not included)
• [in] color_data: RGB color data that will be dumped to the specific window range
esp_err_t esp_lcd_panel_mirror(esp_lcd_panel_handle_t panel, bool mirror_x, bool mirror_y)
Mirror the LCD panel on specific axis.
Note Combined with esp_lcd_panel_swap_xy(), one can realize screen rotation
Return
• ESP_OK on success
• ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
Parameters
• [in] panel: LCD panel handle, which is created by other factory API like
esp_lcd_new_panel_st7789()
• [in] mirror_x: Whether the panel will be mirrored about the x axis
• [in] mirror_y: Whether the panel will be mirrored about the y axis
esp_err_t esp_lcd_panel_swap_xy(esp_lcd_panel_handle_t panel, bool swap_axes)
Swap/Exchange x and y axis.
Note Combined with esp_lcd_panel_mirror(), one can realize screen rotation
Return
• ESP_OK on success
• ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
Parameters
• [in] panel: LCD panel handle, which is created by other factory API like
esp_lcd_new_panel_st7789()
Espressif Systems 313
Submit Document Feedback
Release v4.4