EasyManua.ls Logo

Espressif ESP32-S2 - Page 233

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
init_config: Pointer to Digital ADC initilization config. Refer to
adc_digi_init_config_t.
esp_err_t adc_digi_read_bytes(uint8_t *buf, uint32_t length_max, uint32_t *out_length, uint32_t
timeout_ms)
Read bytes from Digital ADC through DMA.
Return
ESP_ERR_INVALID_STATE Driver state is invalid. Usually it means the ADC sampling rate is
faster than the task processing rate.
ESP_ERR_TIMEOUT Operation timed out
ESP_OK On success
Parameters
[out] buf: Buffer to read from ADC.
[in] length_max: Expected length of data read from the ADC.
[out] out_length: Real length of data read from the ADC via this API.
[in] timeout_ms: Time to wait for data via this API, in millisecond.
esp_err_t adc_digi_start(void)
Start the Digital ADC and DMA peripherals. After this, the hardware starts working.
Return
ESP_ERR_INVALID_STATE Driver state is invalid.
ESP_OK On success
esp_err_t adc_digi_stop(void)
Stop the Digital ADC and DMA peripherals. After this, the hardware stops working.
Return
ESP_ERR_INVALID_STATE Driver state is invalid.
ESP_OK On success
esp_err_t adc_digi_deinitialize(void)
Deinitialize the Digital ADC.
Return
ESP_ERR_INVALID_STATE Driver state is invalid.
ESP_OK On success
esp_err_t adc_digi_controller_configure(const adc_digi_configuration_t *config)
Setting the digital controller.
Return
ESP_ERR_INVALID_STATE Driver state is invalid.
ESP_ERR_INVALID_ARG If the combination of arguments is invalid.
ESP_OK On success
Parameters
config: Pointer to digital controller paramter. Refer to adc_digi_config_t.
esp_err_t adc_digi_filter_reset(adc_digi_filter_idx_t idx)
Reset adc digital controller filter.
Return
ESP_OK Success
Parameters
idx: Filter index.
esp_err_t adc_digi_filter_set_config(adc_digi_filter_idx_t idx, adc_digi_filter_t *config)
Set adc digital controller filter configuration.
Note For ESP32S2, Filter IDX0/IDX1 can only be used to filter all enabled channels of ADC1/ADC2 unit at
the same time.
Return
ESP_OK Success
Parameters
Espressif Systems 222
Submit Document Feedback
Release v4.4

Table of Contents