Sarah Marsh
/
U_Blox_DeviceConnector
Example of C027 with connector
Fork of U_Blox_DeviceConnector by
Diff: main.cpp
- Revision:
- 41:496e5ec1f1bd
- Parent:
- 39:4a161de53cde
- Child:
- 42:d9a3043214a6
--- a/main.cpp Thu Dec 08 12:30:11 2016 +0000 +++ b/main.cpp Sat Dec 10 22:30:09 2016 +0000 @@ -26,19 +26,24 @@ #include "rtos.h" #if MBED_CONF_APP_NETWORK_INTERFACE == WIFI -#include "ESP8266Interface.h" -ESP8266Interface esp(MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); + #if TARGET_UBLOX_EVK_ODIN_W2 + #include "OdinWiFiInterface.h" + OdinWiFiInterface wifi; + #else + #include "ESP8266Interface.h" + ESP8266Interface wifi(MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); + #endif #elif MBED_CONF_APP_NETWORK_INTERFACE == ETHERNET -#include "EthernetInterface.h" -EthernetInterface eth; + #include "EthernetInterface.h" + EthernetInterface eth; #elif MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND -#define MESH -#include "NanostackInterface.h" -LoWPANNDInterface mesh; + #define MESH + #include "NanostackInterface.h" + LoWPANNDInterface mesh; #elif MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD -#define MESH -#include "NanostackInterface.h" -ThreadInterface mesh; + #define MESH + #include "NanostackInterface.h" + ThreadInterface mesh; #endif #if defined(MESH) @@ -387,8 +392,8 @@ #if MBED_CONF_APP_NETWORK_INTERFACE == WIFI output.printf("\n\rUsing WiFi \r\n"); output.printf("\n\rConnecting to WiFi..\r\n"); - connect_success = esp.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD); - network_interface = &esp; + connect_success = wifi.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD); + network_interface = &wifi; #elif MBED_CONF_APP_NETWORK_INTERFACE == ETHERNET output.printf("Using Ethernet\r\n"); connect_success = eth.connect();