Skip to content

Commit fde08a1

Browse files
author
Seppo Takalo
committed
Fix includes.
Cannot include header file witin a function (without severe side effects)
1 parent 0498e8d commit fde08a1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

TESTS/network/wifi/get_interface.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#include "mbed.h"
2+
3+
#if TARGET_UBLOX_EVK_ODIN_W2
4+
#include "OdinWiFiInterface.h"
5+
#elif TARGET_REALTEK_RTL8195AM
6+
#include "RTWInterface.h"
7+
#else
28
#include "ESP8266Interface.h"
9+
#endif
310

411
WiFiInterface *get_interface()
512
{
@@ -9,10 +16,8 @@ WiFiInterface *get_interface()
916
delete interface;
1017

1118
#if TARGET_UBLOX_EVK_ODIN_W2
12-
#include "OdinWiFiInterface.h"
1319
interface = new OdinWiFiInterface();
1420
#elif TARGET_REALTEK_RTL8195AM
15-
#include "RTWInterface.h"
1621
interface = new RTWInterface();
1722
#else
1823
interface = new ESP8266Interface(D1, D0);

0 commit comments

Comments
 (0)