local fork (temporary)

Dependents:   VodafoneUSBModem_bleedingedge2

Fork of USBHostWANDongle_bleedingedge by Donatien Garnier

Revision:
25:3184f71557bf
Parent:
22:bec61bcc9c25
Parent:
18:7d5242aa7b95
--- a/USB3GModule/WANDongleInitializer.h	Wed Jan 09 16:13:34 2013 +0000
+++ b/USB3GModule/WANDongleInitializer.h	Fri Mar 08 11:04:45 2013 +0000
@@ -28,11 +28,12 @@
 
 enum WAN_DONGLE_TYPE
 {
-  WAN_DONGLE_TYPE_UNKNOWN = -1,
-  WAN_DONGLE_TYPE_VODAFONEK3770 = 0,
-  WAN_DONGLE_TYPE_VODAFONEK3772Z = 1,
-  WAN_DONGLE_TYPE_VODAFONEK3773 = 2,
-  WAN_DONGLE_TYPE_VODAFONEMU509 = 3,
+  WAN_DONGLE_TYPE_UNKNOWN        = -1,
+  WAN_DONGLE_TYPE_VODAFONEK3770  =  0,
+  WAN_DONGLE_TYPE_VODAFONEK3772Z =  1,
+  WAN_DONGLE_TYPE_VODAFONEK3772  =  2,
+  WAN_DONGLE_TYPE_VODAFONEK3773  =  3,
+  WAN_DONGLE_TYPE_VODAFONEMU509  =  4,
 };
 
 class WANDongleInitializer : public IUSBEnumerator
@@ -192,4 +193,37 @@
   int m_endpointsToFetch;
 };
 
+class VodafoneK3772Initializer : public WANDongleInitializer
+{
+public:
+    VodafoneK3772Initializer(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
+