esp_lcd: Add support for rx_param on I2C transport.

This commit is contained in:
Vilem Zavodny
2022-05-06 09:41:54 +02:00
parent 0eafe4d326
commit 4a2766d906
4 changed files with 98 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -18,6 +18,22 @@ typedef struct esp_lcd_panel_io_t esp_lcd_panel_io_t; /*!< Type of LCD panel IO
* @brief LCD panel IO interface
*/
struct esp_lcd_panel_io_t {
/**
* @brief Transmit LCD command and receive corresponding parameters
*
* @note This is the panel-specific interface called by function `esp_lcd_panel_io_rx_param()`.
*
* @param[in] io LCD panel IO handle, which is created by other factory API like `esp_lcd_new_panel_io_spi()`
* @param[in] lcd_cmd The specific LCD command, set to -1 if no command needed
* @param[out] param Buffer for the command data
* @param[in] param_size Size of `param` buffer
* @return
* - ESP_ERR_INVALID_ARG if parameter is invalid
* - ESP_ERR_NOT_SUPPORTED if read is not supported by transport
* - ESP_OK on success
*/
esp_err_t (*rx_param)(esp_lcd_panel_io_t *io, int lcd_cmd, void *param, size_t param_size);
/**
* @brief Transmit LCD command and corresponding parameters
*