From 0113b39a542d78cfe1f81dae1d650729f9ec3df8 Mon Sep 17 00:00:00 2001 From: Armando Date: Fri, 26 Apr 2024 16:04:18 +0800 Subject: [PATCH] change(camera): change esp_cam_del_ctlr to esp_cam_ctlr_del --- components/esp_driver_cam/esp_cam_ctlr.c | 2 +- components/esp_driver_cam/include/esp_cam_ctlr.h | 2 +- .../esp_driver_cam/test_apps/csi/main/test_csi_driver.c | 4 ++-- docs/en/api-reference/peripherals/camera_driver.rst | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/esp_driver_cam/esp_cam_ctlr.c b/components/esp_driver_cam/esp_cam_ctlr.c index 51a1b3c308..a2a4e2e9d0 100644 --- a/components/esp_driver_cam/esp_cam_ctlr.c +++ b/components/esp_driver_cam/esp_cam_ctlr.c @@ -84,7 +84,7 @@ esp_err_t esp_cam_ctlr_get_frame_buffer_len(esp_cam_ctlr_handle_t handle, size_t return handle->get_buffer_len(handle, ret_fb_len); } -esp_err_t esp_cam_del_ctlr(esp_cam_ctlr_handle_t handle) +esp_err_t esp_cam_ctlr_del(esp_cam_ctlr_handle_t handle) { ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer"); ESP_RETURN_ON_FALSE(handle->del, ESP_ERR_NOT_SUPPORTED, TAG, "controller driver function not supported"); diff --git a/components/esp_driver_cam/include/esp_cam_ctlr.h b/components/esp_driver_cam/include/esp_cam_ctlr.h index 3c7cbe2ae1..6365ad6b73 100644 --- a/components/esp_driver_cam/include/esp_cam_ctlr.h +++ b/components/esp_driver_cam/include/esp_cam_ctlr.h @@ -87,7 +87,7 @@ esp_err_t esp_cam_ctlr_receive(esp_cam_ctlr_handle_t handle, esp_cam_ctlr_trans_ * - ESP_ERR_INVALID_ARG: Invalid argument * - ESP_ERR_INVALID_STATE: Invalid state */ -esp_err_t esp_cam_del_ctlr(esp_cam_ctlr_handle_t handle); +esp_err_t esp_cam_ctlr_del(esp_cam_ctlr_handle_t handle); /** * @brief Register ESP CAM controller event callbacks diff --git a/components/esp_driver_cam/test_apps/csi/main/test_csi_driver.c b/components/esp_driver_cam/test_apps/csi/main/test_csi_driver.c index e7b42583ce..f9890e9c21 100644 --- a/components/esp_driver_cam/test_apps/csi/main/test_csi_driver.c +++ b/components/esp_driver_cam/test_apps/csi/main/test_csi_driver.c @@ -32,7 +32,7 @@ TEST_CASE("TEST CSI driver allocation", "[csi]") TEST_ESP_OK(esp_cam_ctlr_get_frame_buffer_len(handle, &bk_buffer_len)); TEST_ASSERT_NOT_NULL(bk_buffer); TEST_ASSERT_EQUAL((csi_config.h_res * csi_config.v_res * 2), bk_buffer_len); // out type RGB565 using 2 byte / pixel - TEST_ESP_OK(esp_cam_del_ctlr(handle)); + TEST_ESP_OK(esp_cam_ctlr_del(handle)); } TEST_CASE("TEST CSI driver no backup buffer usage", "[csi]") @@ -59,5 +59,5 @@ TEST_CASE("TEST CSI driver no backup buffer usage", "[csi]") TEST_ESP_ERR(ESP_ERR_INVALID_STATE, esp_cam_ctlr_get_frame_buffer_len(handle, &bk_buffer_len)); TEST_ASSERT_NULL(bk_buffer); TEST_ASSERT_EQUAL(0, bk_buffer_len); - TEST_ESP_OK(esp_cam_del_ctlr(handle)); + TEST_ESP_OK(esp_cam_ctlr_del(handle)); } diff --git a/docs/en/api-reference/peripherals/camera_driver.rst b/docs/en/api-reference/peripherals/camera_driver.rst index 6707535827..18bb537b8b 100644 --- a/docs/en/api-reference/peripherals/camera_driver.rst +++ b/docs/en/api-reference/peripherals/camera_driver.rst @@ -60,7 +60,7 @@ Resource Allocation Uninstall Camera Controller Driver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If a previously installed Camera Controller Driver is no longer needed, it's recommended to recycle the resource by calling :cpp:func:`esp_cam_del_ctlr`, so that to release the underlying hardware. +If a previously installed Camera Controller Driver is no longer needed, it's recommended to recycle the resource by calling :cpp:func:`esp_cam_ctlr_del`, so that to release the underlying hardware. .. _cam-enable-disable: @@ -127,7 +127,7 @@ After the Camera Controller Driver starts receiving, it can generate a specific Thread Safety ^^^^^^^^^^^^^ -The factory function :cpp:func:`esp_cam_new_csi_ctlr` and :cpp:func:`esp_cam_del_ctlr` are guaranteed to be thread safe by the driver, which means, user can call them from different RTOS tasks without protection by extra locks. +The factory function :cpp:func:`esp_cam_new_csi_ctlr` and :cpp:func:`esp_cam_ctlr_del` are guaranteed to be thread safe by the driver, which means, user can call them from different RTOS tasks without protection by extra locks. .. _cam-kconfig-options: