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
2020-06-05 14:29:32 +02:00
committed by suren-gabrielyan-espressif
parent ad67a23097
commit 07f57523c8
3 changed files with 18 additions and 1 deletions

View File

@ -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
*