modem sleep: add wifi power save callback to idle task
This commit is contained in:
parent
2dda3f57b5
commit
c694c5134f
3 changed files with 13 additions and 2 deletions
|
@ -105,6 +105,15 @@ esp_err_t esp_wifi_internal_reg_rxcb(wifi_interface_t ifx, wifi_rxcb_t fn);
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_internal_set_sta_ip(void);
|
esp_err_t esp_wifi_internal_set_sta_ip(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The WiFi power save callback function
|
||||||
|
*
|
||||||
|
* @param none
|
||||||
|
*
|
||||||
|
* @return none
|
||||||
|
*/
|
||||||
|
void esp_wifi_ps_idle_cb(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "soc/timer_group_struct.h"
|
#include "soc/timer_group_struct.h"
|
||||||
#include "soc/timer_group_reg.h"
|
#include "soc/timer_group_reg.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
#include "esp_wifi_internal.h"
|
||||||
|
|
||||||
#include "esp_task_wdt.h"
|
#include "esp_task_wdt.h"
|
||||||
|
|
||||||
|
@ -167,6 +168,7 @@ void vApplicationIdleHook(void) {
|
||||||
if (xPortGetCoreID()!=0) return;
|
if (xPortGetCoreID()!=0) return;
|
||||||
#endif
|
#endif
|
||||||
esp_task_wdt_feed();
|
esp_task_wdt_feed();
|
||||||
|
esp_wifi_ps_idle_cb();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ functions but without including stdio.h here. */
|
||||||
/*
|
/*
|
||||||
* Defines the size, in words, of the stack allocated to the idle task.
|
* Defines the size, in words, of the stack allocated to the idle task.
|
||||||
*/
|
*/
|
||||||
#define tskIDLE_STACK_SIZE configMINIMAL_STACK_SIZE
|
#define tskIDLE_STACK_SIZE 2048//configMINIMAL_STACK_SIZE
|
||||||
|
|
||||||
#if( configUSE_PREEMPTION == 0 )
|
#if( configUSE_PREEMPTION == 0 )
|
||||||
/* If the cooperative scheduler is being used then a yield should not be
|
/* If the cooperative scheduler is being used then a yield should not be
|
||||||
|
|
Loading…
Reference in a new issue