feat(esp_driver_cam): DVP driver supports only initializing the clock and XCLK pin to generate a clock for the external device

This commit is contained in:
Dong Heng
2025-07-03 19:42:44 +08:00
parent 5590a741ee
commit c47b72daed
3 changed files with 81 additions and 10 deletions

View File

@@ -7,6 +7,7 @@
#include "sdkconfig.h"
#include "unity.h"
#include "esp_cam_ctlr_dvp.h"
#include "esp_private/esp_cam_dvp.h"
#include "esp_cam_ctlr.h"
TEST_CASE("TEST DVP driver allocation", "[DVP]")
@@ -171,3 +172,14 @@ TEST_CASE("TEST DVP driver intern/extern generate xclk", "[DVP]")
TEST_ESP_OK(esp_cam_new_dvp_ctlr(&dvp_config, &handle));
TEST_ESP_OK(esp_cam_ctlr_del(handle));
}
TEST_CASE("TEST DVP driver only output xclk signal", "[DVP]")
{
TEST_ESP_OK(esp_cam_ctlr_dvp_start_clock(0, 20, CAM_CLK_SRC_DEFAULT, 20000000));
TEST_ESP_OK(esp_cam_ctlr_dvp_deinit(0));
#if CONFIG_IDF_TARGET_ESP32S3
TEST_ESP_OK(esp_cam_ctlr_dvp_start_clock(0, 20, CAM_CLK_SRC_PLL240M, 24000000));
TEST_ESP_OK(esp_cam_ctlr_dvp_deinit(0));
#endif
}