Clément BENOIT / PYRN

Dependencies:   CAN HTTPClient MODSERIAL MyThings Pyrn3GModem Socket TinyGPS MyUSBHost lwip-sys lwip mbed-rtos mbed-src

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HuaweiE372DongleInitializer.h Source File

HuaweiE372DongleInitializer.h

00001 
00002 #ifndef HUAWEI372_DONGLE_INITIALIZER_H
00003 #define HUAWEI372_DONGLE_INITIALIZER_H
00004 
00005 #include "WANDongleInitializer.h"
00006 
00007 #define WAN_DONGLE_TYPE_HUAWEI_E372  1
00008 
00009 // For the moment we have only one key
00010 class HuaweiE372DongleInitializer: public WANDongleInitializer {
00011 public:
00012     HuaweiE372DongleInitializer(USBHost *h);
00013     virtual uint16_t getMSDVid() { return 0x12D1; }
00014     virtual uint16_t getMSDPid() { return 0x1505; }
00015     virtual uint16_t getSerialVid() { return 0x12D1; }
00016     virtual uint16_t getSerialPid() { return 0x14ac; }
00017     virtual bool switchMode(USBDeviceConnected* pDev) ;
00018     virtual USBEndpoint* getEp(USBDeviceConnected* pDev, int serialPortNumber, bool tx);
00019     virtual int getSerialPortCount() { return 4; }
00020     virtual void setVidPid(uint16_t vid, uint16_t pid) ;
00021     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
00022     virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir) ; //Must return true if the endpoint will be used
00023     virtual int getType() { return WAN_DONGLE_TYPE_HUAWEI_E372; }
00024     virtual uint8_t getSerialIntf(int index) { return index; }
00025 private:
00026     bool m_hasSwitched;
00027     int m_currentSerialIntf;
00028     int m_endpointsToFetch;
00029 };
00030 
00031 #endif  // HUAWEI372_DONGLE_INITIALIZER_H