adc_i2s: solve the i2s_adc issue when using wifi

This commit is contained in:
Cao Sen Miao
2020-12-03 13:58:24 +08:00
parent d890a516a1
commit d6f0b4af6f
6 changed files with 205 additions and 28 deletions

View File

@@ -161,7 +161,7 @@ static int hall_sensor_get_value(void) //hall sensor without LNA
{
int hall_value;
adc_power_on();
adc_power_acquire();
ADC_ENTER_CRITICAL();
/* disable other peripherals. */
@@ -173,6 +173,7 @@ static int hall_sensor_get_value(void) //hall sensor without LNA
adc_hal_hall_disable();
ADC_EXIT_CRITICAL();
adc_power_release();
return hall_value;
}