mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 11:05:39 +00:00
adc: support adc2 working with WiFi
This commit is contained in:
committed by
Armando (Dou Yiwen)
parent
69deaf528f
commit
3ce2d85e9e
@@ -538,6 +538,9 @@ esp_err_t adc2_get_raw(adc2_channel_t channel, adc_bits_width_t width_bit, int *
|
||||
|
||||
SAR_ADC2_LOCK_ACQUIRE();
|
||||
|
||||
adc_arbiter_t config = ADC_ARBITER_CONFIG_DEFAULT();
|
||||
adc_hal_arbiter_config(&config);
|
||||
|
||||
adc_atten_t atten = s_atten2_single[channel];
|
||||
uint32_t cal_val = adc_get_calibration_offset(ADC_NUM_2, channel, atten);
|
||||
adc_hal_set_calibration_param(ADC_NUM_2, cal_val);
|
||||
|
||||
Reference in New Issue
Block a user