36 #include "driver/adc.h"
37 #include "driver/adc_types_legacy.h"
61 #define ADC_ATTENUATION_11_DB ADC_ATTENUATION_12_DB
141 __attribute__((__deprecated__))
142 int adc_line_vref_to_gpio(
adc_t line, gpio_t gpio);
144 #if defined(CPU_FAM_ESP32)
156 __attribute__((__deprecated__))
157 static inline int adc_vref_to_gpio25(
void)
159 return adc_vref_to_gpio(ADC_UNIT_2, GPIO25);
Low-level ADC peripheral driver interface definitions.
int adc_raw_to_voltage(adc_t line, int sample, int *voltage)
Get the voltage for a given sample value.
int adc_set_attenuation(adc_t line, adc_atten_t atten)
Set the attenuation for the ADC line.
adc_attenuation_t
Attenuations that can be set for ADC lines.
@ ADC_ATTENUATION_12_DB
full-range is about 3.3 V
@ ADC_ATTENUATION_0_DB
full-range is about 1.1 V (Vref)
@ ADC_ATTENUATION_3_DB
full-range is about 1.5 V
@ ADC_ATTENUATION_6_DB
full-range is about 2.2 V
Low-level GPIO peripheral driver interface definitions.
uint_fast8_t adc_t
Define default ADC type identifier.