feat(cam): add camera buffer alloc function

This commit is contained in:
gaoxu
2025-07-04 16:58:44 +08:00
parent b9c224215e
commit ee3de247e2
13 changed files with 166 additions and 35 deletions

View File

@@ -112,6 +112,8 @@ Camera controller driver can be implemented in one of following ways:
If :cpp:type:`esp_cam_ctlr_lcd_cam_cfg_t` is specified, users can call :cpp:func:`esp_cam_new_lcd_cam_ctlr` to allocate and initialize a DVP camera controller handle. This function will return an DVP camera controller handle if it runs correctly. You can take following code as reference.
After calling :cpp:func:`esp_cam_new_dvp_ctlr`, you should allocate a camera buffer that meets the alignment constraints, or call :cpp:func:`esp_cam_ctlr_alloc_buffer` to automatically allocate.
.. code:: c
esp_cam_ctlr_handle_t cam_handle = NULL;

View File

@@ -112,6 +112,8 @@
如果指定了 :cpp:type:`esp_cam_ctlr_dvp_config_t` 中的配置,就可以调用 :cpp:func:`esp_cam_new_dvp_ctlr` 来分配和初始化 DVP 摄像头控制器句柄。如果函数运行正确,将返回一个 DVP 摄像头控制器句柄。请参考以下代码。
在调用 :cpp:func:`esp_cam_new_dvp_ctlr` 之后,需要分配符合对齐约束的摄像头缓冲区,或调用 :cpp:func:`esp_cam_ctlr_alloc_buffer` 来自动分配。
.. code:: c
esp_cam_ctlr_handle_t cam_handle = NULL;