Espressif ESP32-S2 Programming Manual page 237

Table of Contents

Advertisement

Chapter 2. API Reference
enum adc_i2s_encode_t
ADC digital controller encode option.
Values:
ADC_ENCODE_12BIT
ADC to DMA data format, , [15:12]-channel [11:0]-12 bits ADC data
ADC_ENCODE_11BIT
ADC to DMA data format, [15]-unit, [14:11]-channel [10:0]-11 bits ADC data
ADC_ENCODE_MAX
Header File
components/hal/include/hal/adc_types.h
Structures
struct adc_digi_pattern_config_t
ADC digital controller pattern configuration.
Public Members
uint8_t atten
Attenuation of this ADC channel.
uint8_t channel
ADC channel.
uint8_t unit
ADC unit.
uint8_t bit_width
ADC output bit width.
struct adc_digi_output_data_t
ADC digital controller (DMA mode) output data format. Used to analyze the acquired ADC (DMA) data.
Note ESP32: Only type1 is valid. ADC2 does not support DMA mode.
Note ESP32-S2: Member channel can be used to judge the validity of the ADC data, because the role of
the arbiter may get invalid ADC data.
Public Members
uint16_t data : 12
ADC real output data info. Resolution: 12 bit.
ADC real output data info. Resolution: 11 bit.
uint16_t channel : 4
ADC channel index info.
ADC channel index info. For ESP32-S2: If (channel < ADC_CHANNEL_MAX), The data is valid. If
(channel > ADC_CHANNEL_MAX), The data is invalid.
uint16_t unit : 1
ADC unit index info. 0: ADC1; 1: ADC2.
struct adc_digi_output_data_t::[anonymous]::[anonymous] type2
When the configured output format is 11bit. ADC_DIGI_FORMAT_11BIT
uint16_t val
Raw data value
Espressif Systems
226
Submit Document Feedback
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF