Fix includes.

Cannot include header file witin a function (without severe side effects)
pull/5161/head
Seppo Takalo 2017-09-29 12:55:04 +03:00
parent 0498e8d3c3
commit fde08a1ee8
1 changed files with 7 additions and 2 deletions

View File

@ -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);