Vodafone K3770/K3772-Z modems driver & networking library

Dependencies:   Socket USBHostWANDongle lwip-sys lwip

Dependents:   VodafoneUSBModemHTTPClientTest VodafoneUSBModemNTPClientTest VodafoneUSBModemSMSTest VodafoneUSBModemUSSDTest ... more

Fork of VodafoneUSBModem_bleedingedge by Donatien Garnier

This is the driver for the Vodafone K3700 & K3772-Z Dongles:

K3770

More details and instructions can be found here.

Revision:
59:593fb493172f
Parent:
52:bd474c9fe51e
Child:
79:a6ac8206a58d
--- a/at/ATCommandsInterface.h	Mon Oct 22 15:47:01 2012 +0000
+++ b/at/ATCommandsInterface.h	Wed Oct 24 14:13:49 2012 +0000
@@ -36,6 +36,8 @@
   virtual bool isATCodeHandled(const char* atCode) = 0; //Is this AT code handled
   virtual void onDispatchStart() = 0;
   virtual void onDispatchStop() = 0;
+  virtual char* getEventsEnableCommand() = 0;
+  virtual char* getEventsDisableCommand() = 0;
   virtual void onEvent(const char* atCode, const char* evt) = 0;
   friend class ATCommandsInterface;
 };
@@ -91,6 +93,7 @@
 
   int executeSimple(const char* command, ATResult* pResult, uint32_t timeout=1000);
   int execute(const char* command, IATCommandsProcessor* pProcessor, ATResult* pResult, uint32_t timeout=1000);
+  
   int registerEventsHandler(IATEventsHandler* pHdlr);
   int deregisterEventsHandler(IATEventsHandler* pHdlr);
 
@@ -100,10 +103,15 @@
 
   static void staticCallback(void const* p);
 private:
+  int executeInternal(const char* command, IATCommandsProcessor* pProcessor, ATResult* pResult, uint32_t timeout=1000);
+  
   int tryReadLine();
   int trySendCommand();
   int processReadLine();
   int processEntryPrompt();
+  
+  void enableEvents();
+  void disableEvents();
 
   int ATResultToReturnCode(ATResult result); //Helper
 
@@ -138,7 +146,8 @@
   Mutex m_processingMtx;
   Thread m_processingThread;
 
-  Mutex m_eventsMtx;
+  Mutex m_eventsMgmtMtx; //Lock events use within the calling thread
+  Mutex m_eventsProcessingMtx; //Lock events use within the processing thread
 };
 
 #endif /* ATCOMMANDSINTERFACE_H_ */