2021-05-11 23:26:07 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "esp_check.h"
|
|
|
|
#include "esp_lcd_panel_io.h"
|
|
|
|
#include "esp_lcd_panel_io_interface.h"
|
|
|
|
|
|
|
|
static const char *TAG = "lcd_panel.io";
|
|
|
|
|
2021-08-04 08:11:31 -04:00
|
|
|
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)
|
2021-05-11 23:26:07 -04:00
|
|
|
{
|
|
|
|
ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_ARG, TAG, "invalid panel io handle");
|
2021-08-04 08:11:31 -04:00
|
|
|
return io->tx_param(io, lcd_cmd, param, param_size);
|
2021-05-11 23:26:07 -04:00
|
|
|
}
|
|
|
|
|
2021-08-04 08:11:31 -04:00
|
|
|
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)
|
2021-05-11 23:26:07 -04:00
|
|
|
{
|
|
|
|
ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_ARG, TAG, "invalid panel io handle");
|
2021-08-04 08:11:31 -04:00
|
|
|
return io->tx_color(io, lcd_cmd, color, color_size);
|
2021-05-11 23:26:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io)
|
|
|
|
{
|
|
|
|
ESP_RETURN_ON_FALSE(io, ESP_ERR_INVALID_ARG, TAG, "invalid panel io handle");
|
|
|
|
return io->del(io);
|
|
|
|
}
|