C027 updated to work with latest mBed libraries

Dependents:   Cellular_HelloMQTT UBLOXModemDriver UBLOXMQTTDriver

Fork of C027_Support by u-blox

Revision:
66:69072b3c5bca
Parent:
63:42cb563a25bc
Child:
72:d1e943ad6558
--- a/MDM.h	Tue May 13 14:41:03 2014 +0000
+++ b/MDM.h	Tue May 13 15:56:28 2014 +0000
@@ -172,7 +172,7 @@
         \param timeout_ms -1 blocking, else non blocking timeout in ms
         \return 0 if successful or SOCKET_ERROR on failure 
     */
-    bool socketSetBlocking(int socket, unsigned int timeout_ms);
+    bool socketSetBlocking(int socket, int timeout_ms);
     
     /** Write socket data 
         \param socket the socket handle
@@ -324,7 +324,10 @@
         TYPE_NOANSWER   = 0x260000,
         TYPE_PROMPT     = 0x300000,
         TYPE_PLUS       = 0x400000,
-        TYPE_TEXT       = 0x500000
+        TYPE_TEXT       = 0x500000,
+        
+        // special timout constant
+        TIMEOUT_BLOCKING = -1
     };
     
     /** Get a line from the physical interface. This function need 
@@ -457,7 +460,7 @@
     IP          _ip;  //!< assigned ip address
     // management struture for sockets
     typedef enum { SOCK_FREE, SOCK_CREATED, SOCK_CONNECTED } SockState;
-    typedef struct { SockState state; int pending; unsigned int timeout_ms; } SockCtrl;
+    typedef struct { SockState state; int pending; int timeout_ms; } SockCtrl;
     // LISA-C has 6 TCP and 6 UDP sockets starting at index 18
     // LISA-U and SARA-G have 7 sockets starting at index 1
     SockCtrl _sockets[32];