2021-05-11 23:26:07 -04:00
|
|
|
/*
|
2022-05-11 03:52:09 -04:00
|
|
|
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
2021-05-11 23:26:07 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "esp_err.h"
|
|
|
|
#include "esp_lcd_types.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Configuration structure for panel device
|
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
int reset_gpio_num; /*!< GPIO used to reset the LCD panel, set to -1 if it's not used */
|
2022-07-18 06:07:32 -04:00
|
|
|
union {
|
|
|
|
lcd_color_rgb_endian_t color_space; /*!< @deprecated Set RGB color space, please use rgb_endian instead */
|
|
|
|
lcd_color_rgb_endian_t rgb_endian; /*!< Set RGB data endian: RGB or BGR */
|
|
|
|
};
|
2021-05-11 23:26:07 -04:00
|
|
|
unsigned int bits_per_pixel; /*!< Color depth, in bpp */
|
|
|
|
struct {
|
|
|
|
unsigned int reset_active_high: 1; /*!< Setting this if the panel reset is high level active */
|
2022-05-11 03:52:09 -04:00
|
|
|
} flags; /*!< LCD panel config flags */
|
|
|
|
void *vendor_config; /*!< vendor specific configuration, optional, left as NULL if not used */
|
2021-05-11 23:26:07 -04:00
|
|
|
} esp_lcd_panel_dev_config_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Create LCD panel for model ST7789
|
|
|
|
*
|
|
|
|
* @param[in] io LCD panel IO handle
|
|
|
|
* @param[in] panel_dev_config general panel device configuration
|
|
|
|
* @param[out] ret_panel Returned LCD panel handle
|
|
|
|
* @return
|
|
|
|
* - ESP_ERR_INVALID_ARG if parameter is invalid
|
|
|
|
* - ESP_ERR_NO_MEM if out of memory
|
|
|
|
* - ESP_OK on success
|
|
|
|
*/
|
|
|
|
esp_err_t esp_lcd_new_panel_st7789(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel);
|
|
|
|
|
2021-08-04 08:11:31 -04:00
|
|
|
/**
|
|
|
|
* @brief Create LCD panel for model NT35510
|
|
|
|
*
|
|
|
|
* @param[in] io LCD panel IO handle
|
|
|
|
* @param[in] panel_dev_config general panel device configuration
|
|
|
|
* @param[out] ret_panel Returned LCD panel handle
|
|
|
|
* @return
|
|
|
|
* - ESP_ERR_INVALID_ARG if parameter is invalid
|
|
|
|
* - ESP_ERR_NO_MEM if out of memory
|
|
|
|
* - ESP_OK on success
|
|
|
|
*/
|
|
|
|
esp_err_t esp_lcd_new_panel_nt35510(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel);
|
|
|
|
|
2021-05-11 23:26:07 -04:00
|
|
|
/**
|
|
|
|
* @brief Create LCD panel for model SSD1306
|
|
|
|
*
|
|
|
|
* @param[in] io LCD panel IO handle
|
|
|
|
* @param[in] panel_dev_config general panel device configuration
|
|
|
|
* @param[out] ret_panel Returned LCD panel handle
|
|
|
|
* @return
|
|
|
|
* - ESP_ERR_INVALID_ARG if parameter is invalid
|
|
|
|
* - ESP_ERR_NO_MEM if out of memory
|
|
|
|
* - ESP_OK on success
|
|
|
|
*/
|
|
|
|
esp_err_t esp_lcd_new_panel_ssd1306(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|