Changes to support Vodafone K4606

Dependents:   VodafoneUSBModem

Fork of USBHostWANDongle by mbed official

Revision:
28:34cdecfff9f4
Parent:
27:980fe31c14f7
--- a/USB3GModule/WANDongleInitializer.h	Fri Sep 20 10:40:15 2013 +0000
+++ b/USB3GModule/WANDongleInitializer.h	Wed Jan 28 11:38:44 2015 +0000
@@ -34,7 +34,8 @@
   WAN_DONGLE_TYPE_VODAFONE_K3772  =  2,
   WAN_DONGLE_TYPE_VODAFONE_K3773  =  3,
   WAN_DONGLE_TYPE_HUAWEI_MU509    =  4,
-  WAN_DONGLE_TYPE_UBLOX_LISAU200  =  5
+  WAN_DONGLE_TYPE_UBLOX_LISAU200  =  5,
+  WAN_DONGLE_TYPE_VODAFONE_K4606  =  6
 };
 
 class WANDongleInitializer : public IUSBEnumerator
@@ -262,5 +263,39 @@
   int m_endpointsToFetch;
 };
 
+
+class VodafoneK4606Initializer : public WANDongleInitializer
+{
+public:
+    VodafoneK4606Initializer(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