USB Host WAN Dongle library
Fork of USBHostWANDongle_bleedingedge by
Diff: USB3GModule/WANDongle.cpp
- Revision:
- 8:0d1ec493842c
- Parent:
- 6:075e36a3463e
- Child:
- 10:08bce4cd973a
- Child:
- 12:a712bad7a979
--- a/USB3GModule/WANDongle.cpp Sat Jul 28 14:15:14 2012 +0000 +++ b/USB3GModule/WANDongle.cpp Mon Jul 30 13:51:34 2012 +0000 @@ -65,7 +65,7 @@ DBG("Enumerate"); host->enumerate(dev, this); - DBG("Device has VID:%04x PID%04x", dev->getVid(), dev->getPid()); + DBG("Device has VID:%04x PID:%04x", dev->getVid(), dev->getPid()); if(m_pInitializer) //If an initializer has been found { @@ -121,6 +121,18 @@ return false; } +WAN_DONGLE_TYPE WANDongle::getDongleType() +{ + if( m_pInitializer != NULL ) + { + return m_pInitializer->getType(); + } + else + { + return WAN_DONGLE_TYPE_UNKNOWN; + } +} + IUSBHostSerial& WANDongle::getSerial(int index) { return m_serial[index]; @@ -147,7 +159,7 @@ //Load right initializer WANDongleInitializer** initializer = WANDongleInitializer::getInitializers(host); - while((*initializer)) + while(*initializer) { DBG("*initializer=%p", *initializer); DBG("(*initializer)->getSerialVid()=%04x", (*initializer)->getSerialVid()); @@ -164,7 +176,7 @@ m_pInitializer = *initializer; break; } - (*initializer)++; + initializer++; } //while() if(m_pInitializer) {