USB Host Library for Sprint Dongles
Fork of USBHostWANDongleSprint by
Diff: USB3GModule/WANDongleInitializer.cpp
- Revision:
- 3:9ec92dd8a8cb
- Parent:
- 2:34c976009b70
- Child:
- 4:cd9864d1db52
- Child:
- 5:99f453c4756b
--- a/USB3GModule/WANDongleInitializer.cpp Mon Sep 24 09:08:49 2012 +0000 +++ b/USB3GModule/WANDongleInitializer.cpp Wed Sep 26 07:07:47 2012 +0000 @@ -16,7 +16,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#define __DEBUG__ 4 +#define __DEBUG__ 0 #ifndef __MODULE__ #define __MODULE__ "WANDongleInitializer.cpp" #endif @@ -76,11 +76,13 @@ m_hasSwitched = true; m_currentSerialIntf = 0; m_endpointsToFetch = 4; + m_endpointsToSkip = 0; } else { m_hasSwitched = false; m_endpointsToFetch = 0; + m_endpointsToSkip = 0; } } @@ -91,7 +93,7 @@ DBG("Interface #%d; Class:%02x; SubClass:%02x; Protocol:%02x", intf_nb, intf_class, intf_subclass, intf_protocol); if( intf_class == 0xFF ) { - if( (m_currentSerialIntf == 0) || (m_currentSerialIntf == 1) ) + if( (m_currentSerialIntf == 0) ) { m_currentSerialIntf++; return true; @@ -109,8 +111,15 @@ DBG("USBEndpoint on Interface #%d; Type:%d; Direction:%d", intf_nb, type, dir); if( (type == BULK_ENDPOINT) && m_endpointsToFetch ) { - m_endpointsToFetch--; - return true; + if(!m_endpointsToSkip) + { + m_endpointsToFetch--; + return true; + } + else + { + m_endpointsToSkip--; + } } } return false;