feat(control_plane): reduce light standby runtime power

This commit is contained in:
chenjintao
2026-08-21 14:24:01 +08:00
parent baad9dcfa0
commit e773ebc458
11 changed files with 264 additions and 9 deletions
@@ -14,6 +14,11 @@
#include "wifi_portal.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "sdkconfig.h"
#ifndef CONFIG_TQ_WIFI_STA_POWER_SAVE
#define CONFIG_TQ_WIFI_STA_POWER_SAVE 0
#endif
static platform_wifi_behavior_hooks_t s_wifi_behavior_hooks;
static SemaphoreHandle_t s_wifi_behavior_hooks_mutex;
@@ -128,6 +133,13 @@ bool platform_wifi_portal_sta_is_connected(void)
return wifi_portal_sta_is_connected();
}
esp_err_t platform_wifi_portal_set_light_standby(bool standby)
{
wifi_ps_type_t ps_type = standby ? WIFI_PS_MIN_MODEM :
(CONFIG_TQ_WIFI_STA_POWER_SAVE ? WIFI_PS_MIN_MODEM : WIFI_PS_NONE);
return esp_wifi_set_ps(ps_type);
}
esp_err_t platform_wifi_portal_start_config_ap(const char *ssid_prefix)
{
return wifi_portal_start_config_ap(ssid_prefix);