#define BIT0 0x00000001 #define WIFI_CONNECTED_BIT BIT0 typedef enum { WIFI_EVENT_WIFI_READY = 0, /**< WiFi ready */ WIFI_EVENT_SCAN_DONE, /**< finish scanning AP */ WIFI_EVENT_STA_START, /**< station start */ WIFI_EVENT_STA_STOP, /**< station stop */ WIFI_EVENT_STA_CONNECTED, /**< station connected to AP */ WIFI_EVENT_STA_DISCONNECTED, /**< station disconnected from AP */ WIFI_EVENT_STA_AUTHMODE_CHANGE, /**< the auth mode of AP connected by station changed */ WIFI_EVENT_STA_GOT_IP, /**< station got IP from connected AP */ WIFI_EVENT_STA_WPS_ER_SUCCESS, /**< station wps succeeds in enrollee mode */ WIFI_EVENT_STA_WPS_ER_FAILED, /**< station wps fails in enrollee mode */ WIFI_EVENT_STA_WPS_ER_TIMEOUT, /**< station wps timeout in enrollee mode */ WIFI_EVENT_STA_WPS_ER_PIN, /**< station wps pin code in enrollee mode */ WIFI_EVENT_AP_START, /**< soft-AP start */ WIFI_EVENT_AP_STOP, /**< soft-AP stop */ WIFI_EVENT_AP_STACONNECTED, /**< a station connected to soft-AP */ WIFI_EVENT_AP_STADISCONNECTED, /**< a station disconnected from soft-AP */ WIFI_EVENT_AP_PROBEREQRECVED, /**< Receive probe request packet in soft-AP interface */ WIFI_EVENT_AP_STA_GOT_IP6, /**< station or ap interface v6IP addr is preferred */ WIFI_EVENT_ETH_START, /**< ethernet start */ WIFI_EVENT_ETH_STOP, /**< ethernet stop */ WIFI_EVENT_ETH_CONNECTED, /**< ethernet phy link up */ WIFI_EVENT_ETH_DISCONNECTED, /**< ethernet phy link down */ WIFI_EVENT_ETH_GOT_IP, /**< ethernet got IP from connected AP */ WIFI_EVENT_MAX } wifi_event_id_t;