Merge branch 'fix/fix_adc_continuous_docs_code_example' into 'master'

adc: fixed adc continuous programming guide code examples

Closes DOC-8485

See merge request espressif/esp-idf!32356
This commit is contained in:
Armando (Dou Yiwen) 2024-07-26 17:32:06 +08:00
commit 27c562a348
2 changed files with 12 additions and 10 deletions

View File

@ -134,11 +134,12 @@ Initialize the ADC Continuous Mode Driver
.. code:: c
adc_continuous_handle_t handle = NULL;
adc_continuous_handle_cfg_t adc_config = {
.max_store_buf_size = 1024,
.conv_frame_size = 100,
.conv_frame_size = 256,
};
ESP_ERROR_CHECK(adc_continuous_new_handle(&adc_config));
ESP_ERROR_CHECK(adc_continuous_new_handle(&adc_config, &handle));
Recycle the ADC Unit
@ -146,7 +147,7 @@ Recycle the ADC Unit
.. code:: c
ESP_ERROR_CHECK(adc_continuous_deinit());
ESP_ERROR_CHECK(adc_continuous_deinit(handle));
.. _adc-continuous-adc-configurations:
@ -200,11 +201,11 @@ On the contrary, calling :cpp:func:`adc_continuous_stop` stops the ADC conversio
.. code::c
ESP_ERROR_CHECK(adc_continuous_start());
ESP_ERROR_CHECK(adc_continuous_start(handle));
.. code:: c
ESP_ERROR_CHECK(adc_continuous_stop());
ESP_ERROR_CHECK(adc_continuous_stop(handle));
.. _adc-continuous-register-event-callbacks:

View File

@ -134,11 +134,12 @@ ADC 连续转换模式驱动基于 {IDF_TARGET_NAME} SAR ADC 模块实现,不
.. code:: c
adc_continuous_handle_t handle = NULL;
adc_continuous_handle_cfg_t adc_config = {
.max_store_buf_size = 1024,
.conv_frame_size = 100,
.conv_frame_size = 256,
};
ESP_ERROR_CHECK(adc_continuous_new_handle(&adc_config));
ESP_ERROR_CHECK(adc_continuous_new_handle(&adc_config, &handle));
回收 ADC 单元
@ -146,7 +147,7 @@ ADC 连续转换模式驱动基于 {IDF_TARGET_NAME} SAR ADC 模块实现,不
.. code:: c
ESP_ERROR_CHECK(adc_continuous_deinit());
ESP_ERROR_CHECK(adc_continuous_deinit(handle));
.. _adc-continuous-adc-configurations:
@ -200,11 +201,11 @@ ADC 控制
.. code::c
ESP_ERROR_CHECK(adc_continuous_start());
ESP_ERROR_CHECK(adc_continuous_start(handle));
.. code:: c
ESP_ERROR_CHECK(adc_continuous_stop());
ESP_ERROR_CHECK(adc_continuous_stop(handle));
.. _adc-continuous-register-event-callbacks: