From a68ad7445929380c23b2a8abf896f407ca27ee43 Mon Sep 17 00:00:00 2001 From: liuzhifu Date: Tue, 30 Aug 2016 14:04:12 +0800 Subject: [PATCH] components:esp32 - notify wifi driver when sta got ip --- components/esp32/event.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/esp32/event.c b/components/esp32/event.c index fe9638fce5..b3ff0a59cb 100644 --- a/components/esp32/event.c +++ b/components/esp32/event.c @@ -54,6 +54,7 @@ static esp_err_t system_event_sta_start_handle_default(system_event_t *event); static esp_err_t system_event_sta_stop_handle_default(system_event_t *event); static esp_err_t system_event_sta_connected_handle_default(system_event_t *event); static esp_err_t system_event_sta_disconnected_handle_default(system_event_t *event); +static esp_err_t system_event_sta_gotip_default(system_event_t *event); static system_event_handle_t g_system_event_handle_table[] = { {SYSTEM_EVENT_WIFI_READY, NULL}, @@ -72,6 +73,13 @@ static system_event_handle_t g_system_event_handle_table[] = { {SYSTEM_EVENT_MAX, NULL}, }; +static esp_err_t system_event_sta_gotip_default(system_event_t *event) +{ + extern esp_err_t esp_wifi_set_sta_ip(void); + WIFI_API_CALL_CHECK("esp_wifi_set_sta_ip", esp_wifi_set_sta_ip(), ESP_OK); + return ESP_OK; +} + esp_err_t system_event_ap_start_handle_default(system_event_t *event) { struct ip_info ap_ip; -- 2.40.0