feat(lcd): support color conversion for mipi dsi driver
This commit is contained in:
@@ -211,6 +211,16 @@ typedef enum {
|
||||
COLOR_COMPONENT_INVALID, /*!< Invalid color component */
|
||||
} color_component_t;
|
||||
|
||||
/**
|
||||
* @brief The order of the components per pack in the YUV422 format
|
||||
*/
|
||||
typedef enum {
|
||||
COLOR_YUV422_PACK_ORDER_YUYV, /*!< YUYV */
|
||||
COLOR_YUV422_PACK_ORDER_YVYU, /*!< YVYU */
|
||||
COLOR_YUV422_PACK_ORDER_UYVY, /*!< UYVY */
|
||||
COLOR_YUV422_PACK_ORDER_VYUY, /*!< VYUY */
|
||||
} color_yuv422_pack_order_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -48,6 +48,16 @@ typedef enum {
|
||||
LCD_COLOR_PIXEL_FORMAT_RGB888 = COLOR_PIXEL_RGB888, /*!< 24 bits, 8 bits per R/G/B value */
|
||||
} lcd_color_rgb_pixel_format_t;
|
||||
|
||||
/**
|
||||
* @brief LCD color format
|
||||
*/
|
||||
typedef enum {
|
||||
LCD_COLOR_FMT_RGB565 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB565), ///< RGB565
|
||||
LCD_COLOR_FMT_RGB666 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB666), ///< RGB666
|
||||
LCD_COLOR_FMT_RGB888 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB888), ///< RGB888
|
||||
LCD_COLOR_FMT_YUV422 = COLOR_TYPE_ID(COLOR_SPACE_YUV, COLOR_PIXEL_YUV422), ///< YUV422
|
||||
} lcd_color_format_t;
|
||||
|
||||
/**
|
||||
* @brief LCD color range
|
||||
*/
|
||||
@@ -73,6 +83,17 @@ typedef enum {
|
||||
LCD_YUV_CONV_STD_BT709 = COLOR_CONV_STD_RGB_YUV_BT709, /*!< YUV<->RGB conversion standard: BT.709 */
|
||||
} lcd_yuv_conv_std_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief YUV422 packing order
|
||||
*/
|
||||
typedef enum {
|
||||
LCD_YUV422_PACK_ORDER_YUYV = COLOR_YUV422_PACK_ORDER_YUYV, /*!< YUYV */
|
||||
LCD_YUV422_PACK_ORDER_YVYU = COLOR_YUV422_PACK_ORDER_YVYU, /*!< YVYU */
|
||||
LCD_YUV422_PACK_ORDER_UYVY = COLOR_YUV422_PACK_ORDER_UYVY, /*!< UYVY */
|
||||
LCD_YUV422_PACK_ORDER_VYUY = COLOR_YUV422_PACK_ORDER_VYUY, /*!< VYUY */
|
||||
} lcd_yuv422_pack_order_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -150,7 +150,7 @@ void mipi_dsi_hal_host_gen_read_short_packet(mipi_dsi_hal_context_t *hal, uint8_
|
||||
* @param color_coding Color coding
|
||||
* @param sub_config Sub configuration
|
||||
*/
|
||||
void mipi_dsi_hal_host_dpi_set_color_coding(mipi_dsi_hal_context_t *hal, lcd_color_rgb_pixel_format_t color_coding, uint32_t sub_config);
|
||||
void mipi_dsi_hal_host_dpi_set_color_coding(mipi_dsi_hal_context_t *hal, lcd_color_format_t color_coding, uint32_t sub_config);
|
||||
|
||||
/**
|
||||
* @brief Set horizontal timing parameters for DPI
|
||||
|
||||
Reference in New Issue
Block a user