mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(hal):graudate the camera hal driver into a new component
This commit is contained in:
@@ -4,7 +4,7 @@ set(srcs "esp_cam_ctlr.c" "dvp_share_ctrl.c")
|
||||
|
||||
set(includes "include" "interface")
|
||||
|
||||
set(requires "esp_driver_isp")
|
||||
set(requires "esp_driver_isp" "esp_hal_cam")
|
||||
|
||||
set(priv_requires "esp_driver_gpio")
|
||||
|
||||
|
||||
@@ -17,16 +17,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ESP_CAM_CTLR_DVP_DATA_SIG_NUM 16
|
||||
|
||||
/**
|
||||
* @brief ESP CAM DVP pins configuration
|
||||
*/
|
||||
typedef struct esp_cam_ctlr_dvp_pin_config {
|
||||
cam_ctlr_data_width_t data_width; /*!< Number of data lines */
|
||||
gpio_num_t data_io[CAM_DVP_DATA_SIG_NUM]; /*!< DVP data pin number */
|
||||
gpio_num_t vsync_io; /*!< DVP V-Sync pin number */
|
||||
gpio_num_t de_io; /*!< DVP DE pin number */
|
||||
gpio_num_t pclk_io; /*!< DVP PCLK input pin number, clock is from camera sensor */
|
||||
gpio_num_t xclk_io; /*!< DVP output clock pin number, if using external XTAL, set xclk_io = GPIO_NUM_NC */
|
||||
cam_ctlr_data_width_t data_width; /*!< Number of data lines */
|
||||
gpio_num_t data_io[ESP_CAM_CTLR_DVP_DATA_SIG_NUM]; /*!< DVP data pin number */
|
||||
gpio_num_t vsync_io; /*!< DVP V-Sync pin number */
|
||||
gpio_num_t de_io; /*!< DVP DE pin number */
|
||||
gpio_num_t pclk_io; /*!< DVP PCLK input pin number, clock is from camera sensor */
|
||||
gpio_num_t xclk_io; /*!< DVP output clock pin number, if using external XTAL, set xclk_io = GPIO_NUM_NC */
|
||||
} esp_cam_ctlr_dvp_pin_config_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "esp_check.h"
|
||||
#include "esp_clk_tree.h"
|
||||
#include "soc/cam_periph.h"
|
||||
#include "hal/cam_periph.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_cam_ctlr_dvp_cam.h"
|
||||
#include "esp_private/esp_cam_dvp.h"
|
||||
@@ -43,6 +43,14 @@
|
||||
#define DVP_CAM_CLK_ATOMIC()
|
||||
#endif
|
||||
|
||||
#if CAM_LL_DATA_WIDTH_MAX
|
||||
#define CAP_DVP_PERIPH_NUM CAM_LL_PERIPH_NUM /*!< DVP port number */
|
||||
#define CAM_DVP_DATA_SIG_NUM CAM_LL_DATA_WIDTH_MAX /*!< DVP data bus width of CAM */
|
||||
#else
|
||||
#define CAP_DVP_PERIPH_NUM 0 /*!< Default value */
|
||||
#define CAM_DVP_DATA_SIG_NUM 0 /*!< Default value */
|
||||
#endif
|
||||
|
||||
#define ALIGN_UP_BY(num, align) ((align) == 0 ? (num) : (((num) + ((align) - 1)) & ~((align) - 1)))
|
||||
|
||||
#define DVP_CAM_CONFIG_INPUT_PIN(pin, sig, inv) \
|
||||
|
||||
Reference in New Issue
Block a user