Espressif ESP32-S2 Programming Manual page 319

Table of Contents

Advertisement

Chapter 2. API Reference
Enumerations
enum esp_lcd_color_space_t
LCD color space type definition.
Values:
ESP_LCD_COLOR_SPACE_RGB
Color space: RGB
ESP_LCD_COLOR_SPACE_BGR
Color space: BGR
ESP_LCD_COLOR_SPACE_MONOCHROME
Color space: monochrome
Header File
components/esp_lcd/include/esp_lcd_panel_io.h
Functions
esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t
Transmit LCD command and corresponding parameters.
Note Commands sent by this function are short, so they are sent using polling transactions. The func-
tion does not return before the command tranfer is completed. If any queued transactions sent by
esp_lcd_panel_io_tx_color() are still pending when this function is called, this function will
wait until they are finished and the queue is empty before sending the command(s).
Return
• ESP_ERR_INVALID_ARG if parameter is invalid
• ESP_OK on success
Parameters
• [in]
esp_lcd_new_panel_io_spi()
• [in] lcd_cmd: The specific LCD command
• [in] param: Buffer that holds the command specific parameters, set to NULL if no parameter
is needed for the command
• [in] param_size: Size of param in memory, in bytes, set to zero if no parameter is needed
for the command
esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t
Transmit LCD RGB data.
Note This function will package the command and RGB data into a transaction, and push into a queue.
The real transmission is performed in the background (DMA+interrupt). The caller should take care
of the lifecycle of the color buffer. Recycling of color buffer should be done in the callback
on_color_trans_done().
Return
• ESP_ERR_INVALID_ARG if parameter is invalid
• ESP_OK on success
Parameters
• [in]
esp_lcd_new_panel_io_spi()
• [in] lcd_cmd: The specific LCD command
• [in] color: Buffer that holds the RGB color data
• [in] color_size: Size of color in memory, in bytes
esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t
Destory LCD panel IO handle (deinitialize panel and free all corresponding resource)
Return
• ESP_ERR_INVALID_ARG if parameter is invalid
Espressif Systems
*param, size_t param_size)
io:
LCD panel IO handle, which is created by other factory API like
*color, size_t color_size)
io:
LCD panel IO handle,
Submit Document Feedback
io, int lcd_cmd, const void
io, int lcd_cmd, const void
which is created by factory API like
io)
308
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF