1 /* 2 * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include "soc/soc_caps.h" 10 #include "soc/clk_tree_defs.h" 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 #if SOC_LCD_I80_SUPPORTED || SOC_LCD_RGB_SUPPORTED 17 /** 18 * @brief LCD clock source 19 */ 20 typedef soc_periph_lcd_clk_src_t lcd_clock_source_t; 21 #endif 22 23 /** 24 * @brief RGB color endian 25 */ 26 typedef enum { 27 LCD_RGB_ELEMENT_ORDER_RGB, /*!< RGB element order: RGB */ 28 LCD_RGB_ELEMENT_ORDER_BGR, /*!< RGB element order: BGR */ 29 } lcd_rgb_element_order_t; 30 31 /** 32 * @brief RGB data endian 33 */ 34 typedef enum { 35 LCD_RGB_DATA_ENDIAN_BIG = 0, /*!< RGB data endian: MSB first */ 36 LCD_RGB_DATA_ENDIAN_LITTLE, /*!< RGB data endian: LSB first */ 37 } lcd_rgb_data_endian_t; 38 39 /** 40 * @brief LCD color space 41 */ 42 typedef enum { 43 LCD_COLOR_SPACE_RGB, /*!< Color space: RGB */ 44 LCD_COLOR_SPACE_YUV, /*!< Color space: YUV */ 45 } lcd_color_space_t; 46 47 /** 48 * @brief LCD color range 49 */ 50 typedef enum { 51 LCD_COLOR_RANGE_LIMIT, /*!< Limited color range */ 52 LCD_COLOR_RANGE_FULL, /*!< Full color range */ 53 } lcd_color_range_t; 54 55 /** 56 * @brief YUV sampling method 57 */ 58 typedef enum { 59 LCD_YUV_SAMPLE_422, /*!< YUV 4:2:2 sampling */ 60 LCD_YUV_SAMPLE_420, /*!< YUV 4:2:0 sampling */ 61 LCD_YUV_SAMPLE_411, /*!< YUV 4:1:1 sampling */ 62 } lcd_yuv_sample_t; 63 64 /** 65 * @brief The standard used for conversion between RGB and YUV 66 */ 67 typedef enum { 68 LCD_YUV_CONV_STD_BT601, /*!< YUV<->RGB conversion standard: BT.601 */ 69 LCD_YUV_CONV_STD_BT709, /*!< YUV<->RGB conversion standard: BT.709 */ 70 } lcd_yuv_conv_std_t; 71 72 #ifdef __cplusplus 73 } 74 #endif 75