USB Host WAN Dongle library
Fork of USBHostWANDongle_bleedingedge by
Revision 17:b8739fd10faf, committed 2013-02-21
- Comitter:
- nherriot
- Date:
- Thu Feb 21 09:28:14 2013 +0000
- Parent:
- 16:e1f5ba831485
- Child:
- 18:7d5242aa7b95
- Commit message:
- small debug output changes.
Changed in this revision
--- a/USB3GModule/WANDongle.cpp Sun Feb 10 16:23:31 2013 +0000 +++ b/USB3GModule/WANDongle.cpp Thu Feb 21 09:28:14 2013 +0000 @@ -127,12 +127,13 @@ } } //if() } //if() - else + /*else { // Looks like the getDevice method failed and returned a null pointer. Maybe there has been a power cut, modem pulled or something to stop the modem. // Lets run the initilise routine again. Next time round the loop we might have a handle to an end point! + DBG("Trying to initialise the USB stack since the getDevice method has returned a null pointer"); init(); - } + }*/ } //for() host->unlock(); return false;
--- a/USB3GModule/WANDongle.h Sun Feb 10 16:23:31 2013 +0000 +++ b/USB3GModule/WANDongle.h Thu Feb 21 09:28:14 2013 +0000 @@ -79,6 +79,8 @@ virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used + //void init(); + protected: USBHost * host; USBDeviceConnected * dev;
--- a/USBHost/USBHost.cpp Sun Feb 10 16:23:31 2013 +0000 +++ b/USBHost/USBHost.cpp Thu Feb 21 09:28:14 2013 +0000 @@ -285,6 +285,7 @@ USBDeviceConnected * USBHost::getDevice(uint8_t index) { if ((index >= MAX_DEVICE_NB) || (!deviceInUse[index])) { + DBG("getDevice failed. Index is: %d, and deviceInUse[%d] is %s", index, index, deviceInUse[index]); return NULL; } return (USBDeviceConnected*)&devices[index];