USB Host Library for Sprint Dongles
Fork of USBHostWANDongleSprint_bleedingedge by
Legacy Warning
This is an mbed 2 libary. To learn more about mbed OS 5, visit the docs.
Diff: USB3GModule/WANDongleInitializer.cpp
- Revision:
- 4:cd9864d1db52
- Parent:
- 3:9ec92dd8a8cb
- Child:
- 6:aaf432a6819b
--- a/USB3GModule/WANDongleInitializer.cpp Wed Sep 26 07:07:47 2012 +0000 +++ b/USB3GModule/WANDongleInitializer.cpp Wed Oct 03 14:08:39 2012 +0000 @@ -66,7 +66,7 @@ int Sprint598UInitializer::getSerialPortCount() { - return 2; + return 1; } /*virtual*/ void Sprint598UInitializer::setVidPid(uint16_t vid, uint16_t pid) @@ -75,14 +75,11 @@ { m_hasSwitched = true; m_currentSerialIntf = 0; - m_endpointsToFetch = 4; - m_endpointsToSkip = 0; + m_currentEndpoint = 0; } else { m_hasSwitched = false; - m_endpointsToFetch = 0; - m_endpointsToSkip = 0; } } @@ -109,16 +106,16 @@ if( m_hasSwitched ) { DBG("USBEndpoint on Interface #%d; Type:%d; Direction:%d", intf_nb, type, dir); - if( (type == BULK_ENDPOINT) && m_endpointsToFetch ) + if(type == BULK_ENDPOINT) { - if(!m_endpointsToSkip) + if( (m_currentEndpoint >= 2) && (m_currentEndpoint < 4) ) { - m_endpointsToFetch--; + m_currentEndpoint++; return true; } else { - m_endpointsToSkip--; + m_currentEndpoint++; } } }