USB Host WAN Dongle library

Fork of USBHostWANDongle_bleedingedge by Donatien Garnier

Revision:
21:dcc8c866ccbb
Parent:
20:3abcf818be31
Child:
22:bec61bcc9c25
--- a/USB3GModule/WANDongleInitializer.h	Thu Dec 13 14:56:55 2012 +0000
+++ b/USB3GModule/WANDongleInitializer.h	Tue Dec 18 13:56:10 2012 +0000
@@ -32,6 +32,7 @@
   WAN_DONGLE_TYPE_VODAFONEK3770 = 0,
   WAN_DONGLE_TYPE_VODAFONEK3772Z = 1,
   WAN_DONGLE_TYPE_VODAFONEK3773 = 2,
+  WAN_DONGLE_TYPE_VODAFONEMU509 = 3,
 };
 
 class WANDongleInitializer : public IUSBEnumerator
@@ -160,4 +161,36 @@
   int m_endpointsToFetch;
 };
 
+class VodafoneMU509Initializer : public WANDongleInitializer
+{
+public:
+    VodafoneMU509Initializer(USBHost* pHost);
+    
+    virtual uint16_t getMSDVid();
+    virtual uint16_t getMSDPid();
+    
+    virtual uint16_t getSerialVid();
+    virtual uint16_t getSerialPid();
+    
+    virtual bool switchMode(USBDeviceConnected* pDev);
+    
+    virtual USBEndpoint* getEp(USBDeviceConnected* pDev, int serialPortNumber, bool tx);
+    
+    virtual int getSerialPortCount();
+    
+    virtual void setVidPid(uint16_t vid, uint16_t pid);
+    
+    virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol); //Must return true if the interface should be parsed
+    
+    virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used
+    
+    virtual WAN_DONGLE_TYPE getType();
+    
+private:
+
+  bool m_hasSwitched;
+  int m_currentSerialIntf;
+  int m_endpointsToFetch;
+};
+
 #endif