kopia lustrzana https://github.com/espressif/esp-idf
adc: make adc single api only build pm lock on s2
Since ADC single read API only uses polling mode, we don't need to add pm lock in it.pull/7365/head
rodzic
1063f0c9dd
commit
23eb723daf
|
@ -530,7 +530,7 @@ esp_err_t adc2_config_channel_atten(adc2_channel_t channel, adc_atten_t atten)
|
|||
|
||||
static inline void adc2_init(void)
|
||||
{
|
||||
#if !CONFIG_IDF_TARGET_ESP32
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
/* Lock APB clock. */
|
||||
if (s_adc2_arbiter_lock == NULL) {
|
||||
|
@ -609,7 +609,7 @@ esp_err_t adc2_get_raw(adc2_channel_t channel, adc_bits_width_t width_bit, int *
|
|||
adc_hal_set_controller(ADC_NUM_2, ADC_CTRL_RTC);
|
||||
#endif
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
if (s_adc2_arbiter_lock) {
|
||||
esp_pm_lock_acquire(s_adc2_arbiter_lock);
|
||||
|
|
Ładowanie…
Reference in New Issue