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 USBDevice by
Diff: USBHID/USBHID.cpp
- 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;