examples: common connect to also support no connection flow if no inteface chosen

This is useful for testing if there's no need for external network and connection


* Original commit: espressif/esp-idf@085d2b8d25
This commit is contained in:
David Cermak authored and suren-gabrielyan-espressif committed 2022-05-27 17:44:23 +04:00
1 parent ad67a23097
commit 07f57523c8
3 files changed
+18 -1

No files matched your search

@@ -24,6 +24,11 @@ extern "C" {
#define EXAMPLE_INTERFACE get_example_netif()
#endif
#if !defined (CONFIG_EXAMPLE_CONNECT_ETHERNET) && !defined (CONFIG_EXAMPLE_CONNECT_WIFI)
// This is useful for some tests which do not need a network connection
#define EXAMPLE_INTERFACE NULL
#endif
/**
* @brief Configure Wi-Fi or Ethernet, connect, wait for IP
*