USBHost library. NOTE: This library is only officially supported on the LPC1768 platform. For more information, please see the handbook page.
Dependencies: FATFileSystem mbed-rtos
Dependents: BTstack WallbotWii SD to Flash Data Transfer USBHost-MSD_HelloWorld ... more
Legacy Warning
This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.
Pull requests against this repository are no longer supported. Please raise against mbed OS 5 as documented above.
Diff: USBHost3GModule/WANDongle.cpp
- Revision:
- 23:759ec18ee1a7
- Parent:
- 18:37c948cf0dbf
- Child:
- 24:868cbfe611a7
--- a/USBHost3GModule/WANDongle.cpp Fri Jan 31 10:30:17 2014 +0000 +++ b/USBHost3GModule/WANDongle.cpp Fri Mar 07 16:00:46 2014 +0000 @@ -20,11 +20,6 @@ #ifdef USBHOST_3GMODULE -#define __DEBUG__ 0 -#ifndef __MODULE__ -#define __MODULE__ "WANDongle.cpp" -#endif - #include "dbg.h" #include <stdint.h> #include "rtos.h" @@ -50,10 +45,14 @@ USB_DBG("Trying to connect device"); if (dev_connected) { + USB_DBG("Device is already connected!"); return true; } m_pInitializer = NULL; + + //Protect from concurrent access from USB thread + USBHost::Lock lock(host); for (int i = 0; i < MAX_DEVICE_CONNECTED; i++) {