give example to use GPRS Shield library

Dependencies:   GPRS mbed

Fork of GPRS_Shield_Test by wei zou

Revision:
0:53b4a13adcfb
Child:
1:65d3c8a4a166
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 14 09:46:27 2013 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+#include "string.h"
+#include "gprs.h"
+
+#define SERIAL_DEBUG            1
+#define SEND_SMS_TEST           0
+#define CALL_UP_TEST            0
+#define ANSWER_TEST             0
+#define READ_SMS_TEST           0
+#define TCP_TEST                0
+
+#define IP_ADDRSS               "42.96.164.52"
+#define PORT                    "80"
+
+#if 1
+gprs    gprsTest;
+
+int main(void)
+{
+    if(0 != gprsTest.init()){
+        return -1;
+    }
+
+    #if SEND_SMS_TEST
+    gprsTest.sendSMS("13925257382","hello,lawliet"); //define phone number and text
+    //gprsTest.sendSMS();   // default pone number and text
+    #endif
+
+    #if CALL_UP_TEST
+    //gprsTest.callUp("13925257382");
+    gprsTest.callUp(NULL);
+    #endif
+
+    #if ANSWER_TEST || READ_SMS_TEST
+    gprsTest.loop(1);
+    #endif
+    
+    #if TCP_TEST
+    gprsTest.connectTCP(IP_ADDRSS,PORT);
+    gprsTest.sendTCPData("hello,lawliet test");
+    #endif
+    
+    #if SERIAL_DEBUG
+    gprsTest.serialDebug();
+    #endif
+    
+    return 0;
+}
+#endif
+