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
This commit is contained in:
David Cermak
2020-06-05 14:29:32 +02:00
committed by bot
parent bd1e9b5ea7
commit 085d2b8d25
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
*