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.
Fork of USBHostWANDongle by
Diff: USB3GModule/WANDongleInitializer.cpp
- Revision:
- 24:f4b676f61906
- Parent:
- 23:8f2d9a244224
- Child:
- 25:3184f71557bf
--- a/USB3GModule/WANDongleInitializer.cpp Wed Dec 19 09:32:39 2012 +0000 +++ b/USB3GModule/WANDongleInitializer.cpp Wed Jan 09 16:13:34 2013 +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 @@ -179,7 +179,18 @@ USBEndpoint* VodafoneMU509Initializer::getEp(USBDeviceConnected* pDev, int serialPortNumber, bool tx) { - return pDev->getEndpoint((serialPortNumber==1)?0:1, BULK_ENDPOINT, tx?OUT:IN, 0); + /* + int sPort = serialPortNumber; + if(sPort==1) + sPort = 0; + if(sPort==2) + sPort = 1; + if(sPort==0) + sPort = 2; + return pDev->getEndpoint(sPort, BULK_ENDPOINT, tx?OUT:IN, 0); + */ + return pDev->getEndpoint(serialPortNumber, BULK_ENDPOINT, tx?OUT:IN, 0); + //return pDev->getEndpoint((serialPortNumber==1)?0:1, BULK_ENDPOINT, tx?OUT:IN, 0); } int VodafoneMU509Initializer::getSerialPortCount() @@ -197,7 +208,7 @@ { if( intf_class == 0xFF ) { - if( (m_currentSerialIntf == 0) || (m_currentSerialIntf == 1) ) + if( (m_currentSerialIntf == 0) || (m_currentSerialIntf == 2) ) { m_currentSerialIntf++; return true; @@ -211,6 +222,7 @@ { if( (type == BULK_ENDPOINT) && m_endpointsToFetch ) { + DBG("new endpoint"); m_endpointsToFetch--; return true; }