Changes to support Vodafone K4606
Fork of USBHostWANDongle by
Diff: USB3GModule/WANDongleInitializer.h
- Revision:
- 27:980fe31c14f7
- Parent:
- 25:3184f71557bf
- Child:
- 28:34cdecfff9f4
--- a/USB3GModule/WANDongleInitializer.h Thu Apr 18 11:22:57 2013 +0000 +++ b/USB3GModule/WANDongleInitializer.h Fri Sep 20 10:40:15 2013 +0000 @@ -28,12 +28,13 @@ enum WAN_DONGLE_TYPE { - 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, + WAN_DONGLE_TYPE_UNKNOWN = -1, + WAN_DONGLE_TYPE_VODAFONE_K3770 = 0, + WAN_DONGLE_TYPE_VODAFONE_K3772Z = 1, + WAN_DONGLE_TYPE_VODAFONE_K3772 = 2, + WAN_DONGLE_TYPE_VODAFONE_K3773 = 3, + WAN_DONGLE_TYPE_HUAWEI_MU509 = 4, + WAN_DONGLE_TYPE_UBLOX_LISAU200 = 5 }; class WANDongleInitializer : public IUSBEnumerator @@ -162,10 +163,10 @@ int m_endpointsToFetch; }; -class VodafoneMU509Initializer : public WANDongleInitializer +class HuaweiMU509Initializer : public WANDongleInitializer { public: - VodafoneMU509Initializer(USBHost* pHost); + HuaweiMU509Initializer(USBHost* pHost); virtual uint16_t getMSDVid(); virtual uint16_t getMSDPid(); @@ -225,5 +226,41 @@ int m_endpointsToFetch; }; +//----------------------------------------------------------------------- +// mamm, u-blox Modem +//----------------------------------------------------------------------- + +class UbloxLISAU200Initializer : public WANDongleInitializer +{ +public: + UbloxLISAU200Initializer(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