Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HuaweiUSBModemInitializer.h
- Committer:
- clemounet
- Date:
- 2015-02-20
- Revision:
- 0:67daedd6f74f
File content as of revision 0:67daedd6f74f:
#ifndef HUAWEI_USB_BMODEM_INITIALIZER_H
#define HUAWEI_USB_BMODEM_INITIALIZER_H
#include "mbed.h"
#include "USBHost/USBHost3GModule/WANDongleInitializer.h"
// For the moment we have only one key
class HuaweiE372USBModemInitializer: public WANDongleInitializer{
public:
HuaweiE372USBModemInitializer(USBHost *h);
virtual uint16_t getMSDVid() { return 0x12D1; }
virtual uint16_t getMSDPid() { return 0x1505; }
virtual uint16_t getSerialVid() { return 0x12D1; }
virtual uint16_t getSerialPid() { return 0x14ac; }
virtual bool switchMode(USBDeviceConnected* pDev) ;
virtual USBEndpoint* getEp(USBDeviceConnected* pDev, int serialPortNumber, bool tx);
virtual int getSerialPortCount() { return 4; }
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 int getType() { return WAN_DONGLE_TYPE_HUAWEI_E372; }
virtual uint8_t getSerialIntf(int index) { return index; }
private:
bool m_hasSwitched;
int m_currentSerialIntf;
int m_endpointsToFetch;
};
#endif