example-ublox-cellular-interface_test

Dependencies:   ublox-at-cellular-interface ublox-cellular-base ublox-cellular-base-n2xx ublox-at-cellular-interface-n2xx

Revision:
8:3e170c40a284
Parent:
5:bf352de1d3e5
Child:
10:1f35371d572d
--- a/main.cpp	Mon Jun 12 22:16:17 2017 +0000
+++ b/main.cpp	Wed Jun 14 09:28:20 2017 +0000
@@ -16,6 +16,16 @@
 
 #include "mbed.h"
 #include "UbloxATCellularInterface.h"
+#include "UbloxPPPCellularInterface.h"
+
+// If you wish to use LWIP and the PPP cellular interface, select
+// the line UbloxPPPCellularInterface, otherwise select the line
+// UbloxATCellularInterface.  Using the AT cellular interface does not
+// require LWIP and hence uses less RAM (significant on C027.  It also
+// allows other AT command operations (e.g. sending an SMS) to happen
+// during a data transfer.
+#define INTERFACE_CLASS  UbloxATCellularInterface
+//#define INTERFACE_CLASS  UbloxPPPCellularInterface
 
 // The credentials of the SIM in the board.  If PIN checking is enabled
 // for your SIM card you must set this to the required PIN.
@@ -111,12 +121,12 @@
 
 int main()
 {
-    UbloxATCellularInterface *interface = new UbloxATCellularInterface();
+    INTERFACE_CLASS *interface = new UbloxATCellularInterface();
     // If you need to debug the cellular interface, comment out the
     // instantiation above and uncomment the one below.
-//    UbloxATCellularInterface *interface = new UbloxATCellularInterface(MDMTXD, MDMRXD,
-//                                                                       MBED_CONF_UBLOX_CELL_BAUD_RATE,
-//                                                                       true);
+//    INTERFACE_CLASS *interface = new INTERFACE_CLASS(MDMTXD, MDMRXD,
+//                                                     MBED_CONF_UBLOX_CELL_BAUD_RATE,
+//                                                     true);
     TCPSocket sockTcp;
     UDPSocket sockUdp;
     SocketAddress udpServer;