mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
Merge branch 'feat/isp_dvp_driver_v5.3' into 'release/v5.3'
isp: dvp driver (v5.3) See merge request espressif/esp-idf!31261
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include "hal/color_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Camera Controller Color Type
|
||||
*/
|
||||
typedef enum {
|
||||
CAM_CTLR_COLOR_RAW8 = COLOR_TYPE_ID(COLOR_SPACE_RAW, COLOR_PIXEL_RAW8), ///< RAW8
|
||||
CAM_CTLR_COLOR_RAW10 = COLOR_TYPE_ID(COLOR_SPACE_RAW, COLOR_PIXEL_RAW10), ///< RAW10
|
||||
CAM_CTLR_COLOR_RAW12 = COLOR_TYPE_ID(COLOR_SPACE_RAW, COLOR_PIXEL_RAW12), ///< RAW12
|
||||
CAM_CTLR_COLOR_RGB565 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB565), ///< RGB565
|
||||
CAM_CTLR_COLOR_RGB666 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB666), ///< RGB666
|
||||
CAM_CTLR_COLOR_RGB888 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB888), ///< RGB888
|
||||
CAM_CTLR_COLOR_YUV420 = COLOR_TYPE_ID(COLOR_SPACE_YUV, COLOR_PIXEL_YUV420), ///< YUV420
|
||||
CAM_CTLR_COLOR_YUV422 = COLOR_TYPE_ID(COLOR_SPACE_YUV, COLOR_PIXEL_YUV422), ///< YUV422
|
||||
} cam_ctlr_color_t;
|
||||
|
||||
/**
|
||||
* @brief Camera Controller Data Width
|
||||
*/
|
||||
typedef enum {
|
||||
CAM_CTLR_DATA_WIDTH_8 = 8, ///< 8-bit data width
|
||||
CAM_CTLR_DATA_WIDTH_10 = 10, ///< 10-bit data width
|
||||
CAM_CTLR_DATA_WIDTH_12 = 12, ////< 12-bit data width
|
||||
CAM_CTLR_DATA_WIDTH_16 = 16, ///< 16-bit data width
|
||||
} cam_ctlr_data_width_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -62,7 +62,7 @@ void isp_hal_init(isp_hal_context_t *hal, int isp_id);
|
||||
* @param[in] window_id Window ID
|
||||
* @param[in] window Window info, see `isp_af_window_t`
|
||||
*/
|
||||
void isp_hal_af_window_config(const isp_hal_context_t *hal, int window_id, const isp_af_window_t *window);
|
||||
void isp_hal_af_window_config(const isp_hal_context_t *hal, int window_id, const isp_window_t *window);
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
INTR
|
||||
|
||||
@@ -23,6 +23,24 @@ typedef soc_periph_isp_clk_src_t isp_clk_src_t; ///< Clock source type of
|
||||
typedef int isp_clk_src_t; ///< Default type
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ISP coordinate type
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t x; ///< X coordinate of the point
|
||||
uint32_t y; ///< Y coordinate of the point
|
||||
} isp_coordinate_t;
|
||||
|
||||
/**
|
||||
* @brief ISP window type
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
isp_coordinate_t top_left; ///< The top left point coordinate
|
||||
isp_coordinate_t btm_right; ///< The bottom right point coordinate
|
||||
} isp_window_t;
|
||||
|
||||
/**
|
||||
* @brief ISP Input Source
|
||||
*/
|
||||
@@ -45,6 +63,15 @@ typedef enum {
|
||||
ISP_COLOR_YUV420 = COLOR_TYPE_ID(COLOR_SPACE_YUV, COLOR_PIXEL_YUV420), ///< YUV420
|
||||
} isp_color_t;
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
DVP
|
||||
---------------------------------------------------------------*/
|
||||
#if SOC_ISP_DVP_DATA_WIDTH_MAX
|
||||
#define ISP_DVP_DATA_SIG_NUM SOC_ISP_DVP_DATA_WIDTH_MAX // The ISP DVP data signal number
|
||||
#else
|
||||
#define ISP_DVP_DATA_SIG_NUM 0
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
AF
|
||||
---------------------------------------------------------------*/
|
||||
@@ -54,16 +81,6 @@ typedef enum {
|
||||
#define ISP_AF_WINDOW_NUM 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ISP AF window
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t top_left_x; ///< Top left x axis value
|
||||
uint32_t top_left_y; ///< Top left y axis value
|
||||
uint32_t bottom_right_x; ///< Bottom right x axis value
|
||||
uint32_t bottom_right_y; ///< Bottom right y axis value
|
||||
} isp_af_window_t;
|
||||
|
||||
/**
|
||||
* @brief ISP AF result
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/clk_tree_defs.h"
|
||||
#include "hal/color_types.h"
|
||||
#include "hal/cam_ctlr_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -24,20 +25,6 @@ typedef soc_periph_mipi_csi_phy_clk_src_t mipi_csi_phy_clock_source_t;
|
||||
typedef int mipi_csi_phy_clock_source_t;
|
||||
#endif // SOC_MIPI_CSI_SUPPORTED
|
||||
|
||||
/**
|
||||
* @brief MIPI CSI Color Type
|
||||
*/
|
||||
typedef enum {
|
||||
MIPI_CSI_COLOR_RAW8 = COLOR_TYPE_ID(COLOR_SPACE_RAW, COLOR_PIXEL_RAW8), ///< RAW8
|
||||
MIPI_CSI_COLOR_RAW10 = COLOR_TYPE_ID(COLOR_SPACE_RAW, COLOR_PIXEL_RAW10), ///< RAW10
|
||||
MIPI_CSI_COLOR_RAW12 = COLOR_TYPE_ID(COLOR_SPACE_RAW, COLOR_PIXEL_RAW12), ///< RAW12
|
||||
MIPI_CSI_COLOR_RGB565 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB565), ///< RGB565
|
||||
MIPI_CSI_COLOR_RGB666 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB666), ///< RGB666
|
||||
MIPI_CSI_COLOR_RGB888 = COLOR_TYPE_ID(COLOR_SPACE_RGB, COLOR_PIXEL_RGB888), ///< RGB888
|
||||
MIPI_CSI_COLOR_YUV420 = COLOR_TYPE_ID(COLOR_SPACE_YUV, COLOR_PIXEL_YUV420), ///< YUV420
|
||||
MIPI_CSI_COLOR_YUV422 = COLOR_TYPE_ID(COLOR_SPACE_YUV, COLOR_PIXEL_YUV422), ///< YUV422
|
||||
} mipi_csi_color_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user