mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 12:53:29 +00:00
esp_phy: use spinlock to avoid regi2c access conflicts
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
#include "soc/rtc.h"
|
||||
#include "esp_wpa.h"
|
||||
#include "esp_netif.h"
|
||||
#include "driver/adc.h"
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_phy_init.h"
|
||||
#include "phy.h"
|
||||
@@ -56,7 +55,6 @@ uint64_t g_wifi_feature_caps =
|
||||
#endif
|
||||
0;
|
||||
|
||||
static bool s_wifi_adc_xpd_flag;
|
||||
|
||||
static const char* TAG = "wifi_init";
|
||||
|
||||
@@ -278,24 +276,6 @@ 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) {
|
||||
/* ignore repeated calls to set_xpd_sar when the state is already correct */
|
||||
return;
|
||||
}
|
||||
|
||||
s_wifi_adc_xpd_flag = en;
|
||||
if (en) {
|
||||
adc_power_acquire();
|
||||
} else {
|
||||
adc_power_release();
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ESP_WIFI_FTM_ENABLE
|
||||
void ieee80211_ftm_attach(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user