forked from espressif/esp-idf
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:
@@ -134,11 +134,12 @@ Initialize the ADC Continuous Mode Driver
|
|||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
|
adc_continuous_handle_t handle = NULL;
|
||||||
adc_continuous_handle_cfg_t adc_config = {
|
adc_continuous_handle_cfg_t adc_config = {
|
||||||
.max_store_buf_size = 1024,
|
.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
|
Recycle the ADC Unit
|
||||||
@@ -146,7 +147,7 @@ Recycle the ADC Unit
|
|||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
ESP_ERROR_CHECK(adc_continuous_deinit());
|
ESP_ERROR_CHECK(adc_continuous_deinit(handle));
|
||||||
|
|
||||||
|
|
||||||
.. _adc-continuous-adc-configurations:
|
.. _adc-continuous-adc-configurations:
|
||||||
@@ -200,11 +201,11 @@ On the contrary, calling :cpp:func:`adc_continuous_stop` stops the ADC conversio
|
|||||||
|
|
||||||
.. code::c
|
.. code::c
|
||||||
|
|
||||||
ESP_ERROR_CHECK(adc_continuous_start());
|
ESP_ERROR_CHECK(adc_continuous_start(handle));
|
||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
ESP_ERROR_CHECK(adc_continuous_stop());
|
ESP_ERROR_CHECK(adc_continuous_stop(handle));
|
||||||
|
|
||||||
|
|
||||||
.. _adc-continuous-register-event-callbacks:
|
.. _adc-continuous-register-event-callbacks:
|
||||||
|
@@ -134,11 +134,12 @@ ADC 连续转换模式驱动基于 {IDF_TARGET_NAME} SAR ADC 模块实现,不
|
|||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
|
adc_continuous_handle_t handle = NULL;
|
||||||
adc_continuous_handle_cfg_t adc_config = {
|
adc_continuous_handle_cfg_t adc_config = {
|
||||||
.max_store_buf_size = 1024,
|
.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 单元
|
回收 ADC 单元
|
||||||
@@ -146,7 +147,7 @@ ADC 连续转换模式驱动基于 {IDF_TARGET_NAME} SAR ADC 模块实现,不
|
|||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
ESP_ERROR_CHECK(adc_continuous_deinit());
|
ESP_ERROR_CHECK(adc_continuous_deinit(handle));
|
||||||
|
|
||||||
|
|
||||||
.. _adc-continuous-adc-configurations:
|
.. _adc-continuous-adc-configurations:
|
||||||
@@ -200,11 +201,11 @@ ADC 控制
|
|||||||
|
|
||||||
.. code::c
|
.. code::c
|
||||||
|
|
||||||
ESP_ERROR_CHECK(adc_continuous_start());
|
ESP_ERROR_CHECK(adc_continuous_start(handle));
|
||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
ESP_ERROR_CHECK(adc_continuous_stop());
|
ESP_ERROR_CHECK(adc_continuous_stop(handle));
|
||||||
|
|
||||||
|
|
||||||
.. _adc-continuous-register-event-callbacks:
|
.. _adc-continuous-register-event-callbacks:
|
||||||
|
Reference in New Issue
Block a user