USB Host WAN Dongle library

Fork of USBHostWANDongle_bleedingedge by Donatien Garnier

Revision:
6:075e36a3463e
Parent:
3:4394986752db
Child:
8:0d1ec493842c
--- a/USB3GModule/WANDongle.h	Wed Jul 25 11:13:50 2012 +0000
+++ b/USB3GModule/WANDongle.h	Fri Jul 27 16:14:07 2012 +0000
@@ -25,6 +25,8 @@
 #include "rtos.h"
 
 #include "WANDongleSerialPort.h"
+#include "WANDongleInitializer.h"
+#include "IUSBEnumerator.h"
 
 #define WANDONGLE_MAX_OUTEP_SIZE 64
 #define WANDONGLE_MAX_INEP_SIZE 64
@@ -34,7 +36,7 @@
 /** A class to use a WAN (3G/LTE) access dongle
  *
  */
-class WANDongle {
+class WANDongle : public IUSBEnumerator {
 public:
     /*
     * Constructor
@@ -60,10 +62,20 @@
     IUSBHostSerial& getSerial(int index);
     int getSerialCount();
     
+    //From IUSBEnumerator
+    
+    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
+    
 protected:
     USBHost * host;
     USBDeviceConnected * dev;
     bool dev_connected;
+    
+    WANDongleInitializer* m_pInitializer;
 
     void init();