mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-23 03:39:33 +00:00
examples: wifi getting started examples to use esp_netif_init() and
create default netif instances for station and AP
This commit is contained in:
@@ -45,8 +45,9 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base,
|
||||
|
||||
void wifi_init_softap(void)
|
||||
{
|
||||
tcpip_adapter_init();
|
||||
esp_netif_init();
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
esp_netif_create_default_wifi_ap();
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
||||
|
||||
Reference in New Issue
Block a user