When to use adc_power_acquire()
Posted: Sun Feb 13, 2022 6:07 am
I am using adc functions in order to read battery levels.
Do I need to call adc_power_acquire() prior to doing so and adc_power_release() once finished?
It seems to work without doing so, but I want to make sure that I cleaning up after myself properly and to date have been calling adc_power_off() on deep_sleep.
When is adc_power_acquire(), adc_power_release() required, and when not?
Code: Select all
adc1_get_raw((adc1_channel_t) m_adc_vbat_channel);
uint32_t raw_voltage = esp_adc_cal_raw_to_voltage(adc_reading, adc_chars);
It seems to work without doing so, but I want to make sure that I cleaning up after myself properly and to date have been calling adc_power_off() on deep_sleep.
When is adc_power_acquire(), adc_power_release() required, and when not?