adds a USB serial port to your design

Dependents:   Example_WatchDog_Timer

Revision:
21:ee9f2fa6bdbc
Parent:
11:eeb3cbbaa996
Child:
25:7c72828865f3
--- a/USBHID/USBHID.cpp	Thu Feb 27 09:45:46 2014 +0000
+++ b/USBHID/USBHID.cpp	Thu Mar 27 09:45:42 2014 +0000
@@ -59,6 +59,9 @@
     uint32_t bytesRead = 0;
     bool result;
     result = USBDevice::readEP_NB(EPINT_OUT, report->data, &bytesRead, MAX_HID_REPORT_SIZE);
+    // if readEP_NB did not succeed, does not issue a readStart
+    if (!result)
+        return false;
     report->length = bytesRead;
     if(!readStart(EPINT_OUT, MAX_HID_REPORT_SIZE))
         return false;