From fde08a1ee8df4cf263a5ec6b5989dec3e2f95a03 Mon Sep 17 00:00:00 2001 From: Seppo Takalo Date: Fri, 29 Sep 2017 12:55:04 +0300 Subject: [PATCH] Fix includes. Cannot include header file witin a function (without severe side effects) --- TESTS/network/wifi/get_interface.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TESTS/network/wifi/get_interface.cpp b/TESTS/network/wifi/get_interface.cpp index 54e2bb2a96..99653e009c 100644 --- a/TESTS/network/wifi/get_interface.cpp +++ b/TESTS/network/wifi/get_interface.cpp @@ -1,5 +1,12 @@ #include "mbed.h" + +#if TARGET_UBLOX_EVK_ODIN_W2 +#include "OdinWiFiInterface.h" +#elif TARGET_REALTEK_RTL8195AM +#include "RTWInterface.h" +#else #include "ESP8266Interface.h" +#endif WiFiInterface *get_interface() { @@ -9,10 +16,8 @@ WiFiInterface *get_interface() delete interface; #if TARGET_UBLOX_EVK_ODIN_W2 -#include "OdinWiFiInterface.h" interface = new OdinWiFiInterface(); #elif TARGET_REALTEK_RTL8195AM -#include "RTWInterface.h" interface = new RTWInterface(); #else interface = new ESP8266Interface(D1, D0);