mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-15 02:43:00 +08:00
feat(wifi): refactor wifi power management
This commit is contained in:
components/esp8266
@ -146,7 +146,7 @@ static inline uint32_t sleep_rtc_ticks(pm_soc_clk_t *clk)
|
||||
|
||||
static inline void update_soc_clk(pm_soc_clk_t *clk)
|
||||
{
|
||||
extern uint32_t WdevTimOffSet;
|
||||
extern uint64_t WdevTimOffSet;
|
||||
|
||||
uint32_t slept_us;
|
||||
|
||||
|
@ -74,16 +74,10 @@ static void user_init_entry(void *param)
|
||||
|
||||
extern void app_main(void);
|
||||
|
||||
extern void phy_close_rf(void);
|
||||
|
||||
extern void esp_sleep_unlock();
|
||||
|
||||
/* initialize C++ construture function */
|
||||
for (func = &__init_array_start; func < &__init_array_end; func++)
|
||||
func[0]();
|
||||
|
||||
phy_get_bb_evm();
|
||||
|
||||
/*enable tsf0 interrupt for pwm*/
|
||||
REG_WRITE(PERIPHS_DPORT_BASEADDR, (REG_READ(PERIPHS_DPORT_BASEADDR) & ~0x1F) | 0x1);
|
||||
REG_WRITE(INT_ENA_WDEV, REG_READ(INT_ENA_WDEV) | WDEV_TSF0_REACH_INT);
|
||||
@ -92,9 +86,6 @@ static void user_init_entry(void *param)
|
||||
assert(rtc_init() == 0);
|
||||
assert(mac_init() == 0);
|
||||
assert(base_gpio_init() == 0);
|
||||
esp_phy_load_cal_and_init(0);
|
||||
phy_close_rf();
|
||||
esp_sleep_unlock();
|
||||
|
||||
esp_wifi_set_rx_pbuf_mem_type(WIFI_RX_PBUF_DRAM);
|
||||
|
||||
|
Reference in New Issue
Block a user