init

Dependencies:   aconno_I2C Lis2dh12 WatchdogTimer

Revision:
57:066dfbe8b4b9
Parent:
56:efd9f5613549
Child:
58:8d4a354816b1
--- a/modem.h	Fri Aug 09 14:22:21 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#ifndef MODEM_H
-#define MODEM_H
-
-#include "main.h"
-
-namespace mbed {
-
-    #define UC20_BAUDRATE       115200
-    #define SIM7600_BAUDRATE    115200
-    #define USSD_MAXLENGTH      140
-    #define ATTIMEOUT_VERYSHORT 3000
-    #define ATTIMEOUT_SHORT     5000
-    #define ATTIMEOUT_MED       10000
-    #define ATTIMEOUT_LONG      20000
-    
-    class Modem
-    {
-        public:  
-            Modem(PinName pwrkey, PinName vreg_en, PinName w_disable);
-            ~Modem();
-            
-            //control
-            bool on(bool force2G);
-            void off(bool soft);
-             
-            //funcs
-            bool registerOnNetwork(int maxAttempts, uint32_t timeout, uint32_t &BYREF_NetworkFailCount);
-            char* HTTPpost(char* url, char* message, bool getResponse, int maxAttempts);
-            /*
-            bool USSDsend(char* message);
-            char* USSDreceive(void);
-            char* USSDmessage(char* message, bool needResponse, char* api);
-            */
-            bool USSDsend(char* message, int maxAttempts);
-            char* USSDreceive(int messageIndex);
-            char* USSDmessage(char* message, bool needResponse, int maxAttempts, char* api);
-            char* getLocation(uint8_t accuracy, uint16_t timeout_seconds, uint32_t &BYREF_GPSFailCount, uint32_t &BYREF_NetworkFailCount); //accuracy is 1,2
-            uint64_t getIMEI(void);
-            uint64_t getCCID(void);
-            char* getModemModel(void);
-            
-            //AT
-            void ATsendCMD(char* cmd);
-            bool ATwaitForWord(char* word, uint32_t timeout);
-            bool ATwaitForWordOrBO(char* word1, uint32_t timeout);
-            bool ATgetResponse(char terminator, uint32_t timeout);
-        private:
-
-            
-        protected:
-            DigitalOut _vreg_en;
-            DigitalInOut _pwrkey;
-            DigitalInOut _w_disable;
-    };
-
-} //Namespace
-#endif
\ No newline at end of file