EasyManua.ls Logo

Espressif ESP32-S2 - Page 319

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 io, int lcd_cmd, const void
*param, size_t param_size)
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] io: LCD panel IO handle, which is created by other factory API like
esp_lcd_new_panel_io_spi()
[in] lcd_cmd: The specic 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 io, int lcd_cmd, const void
*color, size_t color_size)
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] io: LCD panel IO handle, which is created by factory API like
esp_lcd_new_panel_io_spi()
[in] lcd_cmd: The specic 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 io)
Destory LCD panel IO handle (deinitialize panel and free all corresponding resource)
Return
ESP_ERR_INVALID_ARG if parameter is invalid
Espressif Systems 308
Submit Document Feedback
Release v4.4

Table of Contents