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.
Dependencies: FATFileSystem mbed-rtos
Dependents: AbitUSBModem_HTTPTest AbitUSBModem_MQTTTest AbitUSBModem_WebsocketTest AbitUSBModem_SMSTest
Fork of USBHost by
Diff: USBHost3GModule/WANDongle.cpp
- Revision:
- 24:868cbfe611a7
- Parent:
- 23:759ec18ee1a7
--- a/USBHost3GModule/WANDongle.cpp Fri Mar 07 16:00:46 2014 +0000
+++ b/USBHost3GModule/WANDongle.cpp Tue Jun 03 11:30:38 2014 +0100
@@ -45,12 +45,12 @@
USB_DBG("Trying to connect device");
if (dev_connected) {
- USB_DBG("Device is already connected!");
+ USB_DBG("Device is already connected!");
return true;
}
-
+
m_pInitializer = NULL;
-
+
//Protect from concurrent access from USB thread
USBHost::Lock lock(host);
@@ -59,16 +59,16 @@
if ((dev = host->getDevice(i)) != NULL)
{
m_pInitializer = NULL; //Will be set in setVidPid callback
-
+
USB_DBG("Enumerate");
int ret = host->enumerate(dev, this);
if(ret)
{
return false;
}
-
+
USB_DBG("Device has VID:%04x PID:%04x", dev->getVid(), dev->getPid());
-
+
if(m_pInitializer) //If an initializer has been found
{
USB_DBG("m_pInitializer=%p", m_pInitializer);
@@ -90,18 +90,18 @@
USB_DBG("Ep %p", m_pInitializer->getEp(dev, j, true));
m_serial[j].connect( dev, m_pInitializer->getEp(dev, j, false), m_pInitializer->getEp(dev, j, true) );
}
-
+
USB_DBG("Device connected");
-
+
dev_connected = true;
-
-
+
+
return true;
}
else if ((dev->getVid() == m_pInitializer->getMSDVid()) && (dev->getPid() == m_pInitializer->getMSDPid()))
{
USB_DBG("Vodafone K3370 dongle detected in MSD mode");
- //Try to switch
+ //Try to switch
if( m_pInitializer->switchMode(dev) )
{
USB_DBG("Switched OK");
