mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-21 00:56:38 +08:00
feat(esp8266): set noise timer to 3s in light sleep
This commit is contained in:
@ -419,10 +419,13 @@ esp_err_t esp_pm_configure(const void* vconfig)
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
#endif
|
||||
|
||||
extern void reset_noise_timer(uint16_t interval);
|
||||
const esp_pm_config_esp8266_t* config = (const esp_pm_config_esp8266_t*) vconfig;
|
||||
if (config->light_sleep_enable) {
|
||||
reset_noise_timer(3000);
|
||||
s_sleep_mode = ESP_CPU_LIGHTSLEEP;
|
||||
} else {
|
||||
reset_noise_timer(100);
|
||||
s_sleep_mode = ESP_CPU_WAIT;
|
||||
}
|
||||
return ESP_OK;
|
||||
|
Reference in New Issue
Block a user