Merge branch 'bugfix/crash_on_enabling_verbose_logs_v4.1' into 'release/v4.1'

esp_wifi: Fixes issue of crashing when verbose logs are enabled (v4.1)

See merge request espressif/esp-idf!12494
This commit is contained in:
Jiang Jiang Jian 2021-03-23 03:07:04 +00:00
commit 450f99f0f9

View File

@ -99,22 +99,16 @@ static _lock_t adc1_i2s_lock;
void adc_power_acquire(void)
{
bool powered_on = false;
ADC_ENTER_CRITICAL();
s_adc_power_on_cnt++;
if (s_adc_power_on_cnt == 1) {
adc_power_on_internal();
powered_on = true;
}
ADC_EXIT_CRITICAL();
if (powered_on) {
ESP_LOGV(ADC_TAG, "%s: ADC powered on", __func__);
}
}
void adc_power_release(void)
{
bool powered_off = false;
ADC_ENTER_CRITICAL();
s_adc_power_on_cnt--;
/* Sanity check */
@ -124,12 +118,8 @@ void adc_power_release(void)
abort();
} else if (s_adc_power_on_cnt == 0) {
adc_power_off_internal();
powered_off = true;
}
ADC_EXIT_CRITICAL();
if (powered_off) {
ESP_LOGV(ADC_TAG, "%s: ADC powered off", __func__);
}
}
static void adc_power_on_internal(void)