mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 20:54:24 +00:00
rgb_lcd: deprecate esp_lcd_color_space_t
This commit is contained in:
@@ -18,7 +18,10 @@ extern "C" {
|
||||
*/
|
||||
typedef struct {
|
||||
int reset_gpio_num; /*!< GPIO used to reset the LCD panel, set to -1 if it's not used */
|
||||
esp_lcd_color_space_t color_space; /*!< Set the color space used by the LCD panel */
|
||||
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 */
|
||||
};
|
||||
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 */
|
||||
|
@@ -1,10 +1,12 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "hal/lcd_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -12,14 +14,22 @@ extern "C" {
|
||||
typedef struct esp_lcd_panel_io_t *esp_lcd_panel_io_handle_t; /*!< Type of LCD panel IO handle */
|
||||
typedef struct esp_lcd_panel_t *esp_lcd_panel_handle_t; /*!< Type of LCD panel handle */
|
||||
|
||||
/** @cond */
|
||||
/**
|
||||
* @brief LCD color space type definition
|
||||
* @brief LCD color space type definition (WRONG!)
|
||||
* @deprecated RGB and BGR should belong to the same color space, but this enum take them both as two different color spaces.
|
||||
* If you want to use a enum to describe a color space, please use lcd_color_space_t instead.
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_LCD_COLOR_SPACE_RGB, /*!< Color space: RGB */
|
||||
ESP_LCD_COLOR_SPACE_BGR, /*!< Color space: BGR */
|
||||
ESP_LCD_COLOR_SPACE_MONOCHROME, /*!< Color space: monochrome */
|
||||
} esp_lcd_color_space_t;
|
||||
} esp_lcd_color_space_t __attribute__((deprecated));
|
||||
|
||||
// Ensure binary compatibility with lcd_color_rgb_endian_t
|
||||
_Static_assert((lcd_color_rgb_endian_t)ESP_LCD_COLOR_SPACE_RGB == LCD_RGB_ENDIAN_RGB, "ESP_LCD_COLOR_SPACE_RGB is not compatible with LCD_RGB_ENDIAN_RGB");
|
||||
_Static_assert((lcd_color_rgb_endian_t)ESP_LCD_COLOR_SPACE_BGR == LCD_RGB_ENDIAN_BGR, "ESP_LCD_COLOR_SPACE_BGR is not compatible with LCD_RGB_ENDIAN_BGR");
|
||||
/** @endcond */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user