Jelajahi Sumber

esp_wifi: Add beacon timeout event

xiehang 5 tahun lalu
induk
melakukan
d23be33b0d

+ 3 - 0
components/esp_event/event_send.c

@@ -52,6 +52,9 @@ static system_event_id_t esp_event_legacy_wifi_event_id(int32_t event_id)
     case WIFI_EVENT_STA_AUTHMODE_CHANGE:
         return SYSTEM_EVENT_STA_AUTHMODE_CHANGE;
 
+    case WIFI_EVENT_STA_BEACON_TIMEOUT:
+        return SYSTEM_EVENT_STA_BEACON_TIMEOUT;
+
     case WIFI_EVENT_STA_WPS_ER_SUCCESS:
         return SYSTEM_EVENT_STA_WPS_ER_SUCCESS;
 

+ 1 - 0
components/esp_event/include/esp_event_legacy.h

@@ -36,6 +36,7 @@ typedef enum {
     SYSTEM_EVENT_STA_AUTHMODE_CHANGE,      /*!< the auth mode of AP connected by ESP32 station changed */
     SYSTEM_EVENT_STA_GOT_IP,               /*!< ESP32 station got IP from connected AP */
     SYSTEM_EVENT_STA_LOST_IP,              /*!< ESP32 station lost IP and the IP is reset to 0 */
+    SYSTEM_EVENT_STA_BEACON_TIMEOUT,       /*!< ESP32 station beacon timeout */
     SYSTEM_EVENT_STA_WPS_ER_SUCCESS,       /*!< ESP32 station wps succeeds in enrollee mode */
     SYSTEM_EVENT_STA_WPS_ER_FAILED,        /*!< ESP32 station wps fails in enrollee mode */
     SYSTEM_EVENT_STA_WPS_ER_TIMEOUT,       /*!< ESP32 station wps timeout in enrollee mode */

+ 1 - 0
components/esp_wifi/include/esp_wifi_types.h

@@ -508,6 +508,7 @@ typedef enum {
     WIFI_EVENT_STA_CONNECTED,            /**< ESP32 station connected to AP */
     WIFI_EVENT_STA_DISCONNECTED,         /**< ESP32 station disconnected from AP */
     WIFI_EVENT_STA_AUTHMODE_CHANGE,      /**< the auth mode of AP connected by ESP32 station changed */
+    WIFI_EVENT_STA_BEACON_TIMEOUT,       /**< ESP32 station beacon timeout */
 
     WIFI_EVENT_STA_WPS_ER_SUCCESS,       /**< ESP32 station wps succeeds in enrollee mode */
     WIFI_EVENT_STA_WPS_ER_FAILED,        /**< ESP32 station wps fails in enrollee mode */