1 /*
2 * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include "esp_check.h"
8 #include "esp_lcd_panel_io.h"
9 #include "esp_lcd_panel_io_interface.h"
10
11 static const char *TAG = "lcd_panel.io";
12
esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io,int lcd_cmd,const void * param,size_t param_size)13 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)
14 {
15 ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_ARG, TAG, "invalid panel io handle");
16 return io->tx_param(io, lcd_cmd, param, param_size);
17 }
18
esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io,int lcd_cmd,const void * color,size_t color_size)19 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)
20 {
21 ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_ARG, TAG, "invalid panel io handle");
22 return io->tx_color(io, lcd_cmd, color, color_size);
23 }
24
esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io)25 esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io)
26 {
27 ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_ARG, TAG, "invalid panel io handle");
28 return io->del(io);
29 }
30