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: FastAnalogIn FastIO FastPWM SimpleDMA USBDevice mbed
Fork of Pinscape_Controller by
Diff: main.cpp
- Revision:
- 20:4c43877327ab
- Parent:
- 19:054f8af32fce
- Child:
- 21:5048e16cc9ef
--- a/main.cpp Fri Feb 27 07:48:58 2015 +0000 +++ b/main.cpp Sat Feb 28 00:32:57 2015 +0000 @@ -1211,9 +1211,12 @@ { // Look for an incoming report. Process a few input reports in // a row, but stop after a few so that a barrage of inputs won't - // starve our output event processing. + // starve our output event processing. Also, pause briefly between + // reads; allowing reads to occur back-to-back seems to occasionally + // stall the USB pipeline (for reasons unknown; I'd fix the underlying + // problem if I knew what it was). HID_REPORT report; - for (int rr = 0 ; rr < 4 && js.readNB(&report) ; ++rr) + for (int rr = 0 ; rr < 4 && js.readNB(&report) ; ++rr, wait_ms(1)) { // all Led-Wiz reports are 8 bytes exactly if (report.length == 8)