esp_netif, examples: esp_netif_init() moved into ESP_ERROR_CHECK()

esp_netif_init() returns standard esp_err_t error code (unlike tcpip_adapter init), so shall be checked for the return value
Also to make the initialization code more consistent.
This commit is contained in:
David Cermak
2019-11-29 10:54:02 +01:00
committed by Rocha Euripedes
parent 6b4a3b3759
commit 5488fe31ba
7 changed files with 7 additions and 7 deletions

View File

@@ -169,7 +169,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

View File

@@ -139,7 +139,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

View File

@@ -111,7 +111,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

View File

@@ -128,7 +128,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

View File

@@ -138,7 +138,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

View File

@@ -111,7 +111,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

View File

@@ -120,7 +120,7 @@ void app_main(void)
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(nvs_flash_init());
esp_netif_init(); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.