adc: fixed the issue that ADC power is left on after the calibration is done

Also refactor the locks in the adc_common.c file.
This commit is contained in:
Michael (XIAO Xufeng)
2021-02-01 01:12:28 +08:00
parent 0700129c5a
commit 351ba5ff9e
6 changed files with 157 additions and 125 deletions

View File

@@ -312,6 +312,8 @@ void wifi_apb80m_release(void)
#endif //CONFIG_PM_ENABLE
/* Coordinate ADC power with other modules. This overrides the function from PHY lib. */
// It seems that it is only required on ESP32, but we still compile it for all chips, in case it is
// called by PHY unexpectedly.
void set_xpd_sar(bool en)
{
if (s_wifi_adc_xpd_flag == en) {