This my big project for PYRN Board
Dependencies: CAN HTTPClient MODSERIAL MyThings Pyrn3GModem Socket TinyGPS MyUSBHost lwip-sys lwip mbed-rtos mbed-src
HuaweiE372DongleInitializer.h@0:efe6085327fd, 2015-04-14 (annotated)
- Committer:
- clemounet
- Date:
- Tue Apr 14 13:30:02 2015 +0000
- Revision:
- 0:efe6085327fd
All the projet PYRN 3G-CAN-ACC...
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
clemounet | 0:efe6085327fd | 1 | |
clemounet | 0:efe6085327fd | 2 | #ifndef HUAWEI372_DONGLE_INITIALIZER_H |
clemounet | 0:efe6085327fd | 3 | #define HUAWEI372_DONGLE_INITIALIZER_H |
clemounet | 0:efe6085327fd | 4 | |
clemounet | 0:efe6085327fd | 5 | #include "WANDongleInitializer.h" |
clemounet | 0:efe6085327fd | 6 | |
clemounet | 0:efe6085327fd | 7 | #define WAN_DONGLE_TYPE_HUAWEI_E372 1 |
clemounet | 0:efe6085327fd | 8 | |
clemounet | 0:efe6085327fd | 9 | // For the moment we have only one key |
clemounet | 0:efe6085327fd | 10 | class HuaweiE372DongleInitializer: public WANDongleInitializer { |
clemounet | 0:efe6085327fd | 11 | public: |
clemounet | 0:efe6085327fd | 12 | HuaweiE372DongleInitializer(USBHost *h); |
clemounet | 0:efe6085327fd | 13 | virtual uint16_t getMSDVid() { return 0x12D1; } |
clemounet | 0:efe6085327fd | 14 | virtual uint16_t getMSDPid() { return 0x1505; } |
clemounet | 0:efe6085327fd | 15 | virtual uint16_t getSerialVid() { return 0x12D1; } |
clemounet | 0:efe6085327fd | 16 | virtual uint16_t getSerialPid() { return 0x14ac; } |
clemounet | 0:efe6085327fd | 17 | virtual bool switchMode(USBDeviceConnected* pDev) ; |
clemounet | 0:efe6085327fd | 18 | virtual USBEndpoint* getEp(USBDeviceConnected* pDev, int serialPortNumber, bool tx); |
clemounet | 0:efe6085327fd | 19 | virtual int getSerialPortCount() { return 4; } |
clemounet | 0:efe6085327fd | 20 | virtual void setVidPid(uint16_t vid, uint16_t pid) ; |
clemounet | 0:efe6085327fd | 21 | 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 |
clemounet | 0:efe6085327fd | 22 | virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir) ; //Must return true if the endpoint will be used |
clemounet | 0:efe6085327fd | 23 | virtual int getType() { return WAN_DONGLE_TYPE_HUAWEI_E372; } |
clemounet | 0:efe6085327fd | 24 | virtual uint8_t getSerialIntf(int index) { return index; } |
clemounet | 0:efe6085327fd | 25 | private: |
clemounet | 0:efe6085327fd | 26 | bool m_hasSwitched; |
clemounet | 0:efe6085327fd | 27 | int m_currentSerialIntf; |
clemounet | 0:efe6085327fd | 28 | int m_endpointsToFetch; |
clemounet | 0:efe6085327fd | 29 | }; |
clemounet | 0:efe6085327fd | 30 | |
clemounet | 0:efe6085327fd | 31 | #endif // HUAWEI372_DONGLE_INITIALIZER_H |