File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- #ifndef MBED_CONF_APP_CONNECT_STATEMENT
18
+ #define WIFI 2
19
+ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
20
+ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
19
21
#error [NOT_SUPPORTED] No network configuration found for this target.
20
22
#endif
21
23
27
29
#include " EventQueue.h"
28
30
#include " dns_tests.h"
29
31
30
- #include MBED_CONF_APP_HEADER_FILE
31
-
32
32
using namespace utest ::v1;
33
33
34
34
namespace {
@@ -116,12 +116,10 @@ static void net_bringup()
116
116
{
117
117
MBED_ASSERT (MBED_CONF_APP_DNS_TEST_HOSTS_NUM >= MBED_CONF_NSAPI_DNS_CACHE_SIZE && MBED_CONF_APP_DNS_TEST_HOSTS_NUM >= MBED_CONF_APP_DNS_SIMULT_QUERIES + 1 );
118
118
119
- net = MBED_CONF_APP_OBJECT_CONSTRUCTION;
120
- int err = MBED_CONF_APP_CONNECT_STATEMENT;
121
- TEST_ASSERT_EQUAL (0 , err);
122
-
123
- printf (" MBED: Connected to network\n " );
124
- printf (" MBED: IP Address: %s\n " , net->get_ip_address ());
119
+ net = NetworkInterface::get_default_instance ();
120
+ nsapi_error_t err = net->connect ();
121
+ TEST_ASSERT_EQUAL (NSAPI_ERROR_OK, err);
122
+ printf (" MBED: IP address is '%s'\n " , net->get_ip_address ());
125
123
}
126
124
127
125
// Test setup
You can’t perform that action at this time.
0 commit comments