ok

Revision:
0:a5ae94727346
Child:
1:642a8dbe076c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gprs.h	Thu Nov 14 09:39:58 2013 +0000
@@ -0,0 +1,55 @@
+/*
+  IOT_Mbed.h
+  2013 Copyright (c) Seeed Technology Inc.  All right reserved.
+
+  Author:lawliet.zou@gmail.com
+  2013-11-14
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#ifndef __GPRS_H__
+#define __GPRS_H__
+
+#include "mbed.h"
+
+class gprs{
+
+	public:
+		int init(void);
+		int readBuffer(char *buffer,int count);
+		void sendCmd(char *cmd);
+		int waitForResp(char *resp, int timeout);
+		int sendCmdAndWaitForResp(char *cmd, char *resp, int timeout);
+		int checkSIMStatus(void);
+		int checkSignalStrength(void);
+		int networkInit(void);
+		int sendSMS(char *number, char *data);
+		int sendSMS(void);
+		int readSMS(char *buffer, char *message, bool check);
+		int deleteSMS(int index);
+		int callUp(char *number);
+		int answerWithCheck(char *gprsBuffer, bool check);
+		int loop(bool check);
+		int connectTCP(char *ip, char *port);
+		int sendTCPData(char *data);
+		int closeTCP(void);
+		int shutTCP(void);
+		void serialDebug(void);
+		
+};
+
+//extern gprs GPRS;
+#endif