When to use adc_power_acquire()

william.ferguson.au
Posts: 107
Joined: Wed Jan 02, 2019 8:55 am

When to use adc_power_acquire()

Postby william.ferguson.au » Sun Feb 13, 2022 6:07 am

I am using adc functions in order to read battery levels.

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);
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?

Who is online

Users browsing this forum: danergo and 101 guests