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: mbed FastIO FastPWM USBDevice
Diff: USBJoystick/USBJoystick.cpp
- Revision:
- 37:ed52738445fc
- Parent:
- 35:e959ffba78fd
- Child:
- 38:091e511ce8a0
--- a/USBJoystick/USBJoystick.cpp Sat Dec 19 06:50:23 2015 +0000 +++ b/USBJoystick/USBJoystick.cpp Thu Dec 24 01:37:40 2015 +0000 @@ -588,12 +588,12 @@ // Handle messages on endpoint 4 - this is the keyboard interface. // The host uses this to send updates for the keyboard indicator LEDs // (caps lock, num lock, etc). We don't do anything with these, but -// we at least need to read them to keep the pipe from clogging up. +// we have to read them to keep the pipe open. bool USBJoystick::EP4_OUT_callback() { // read this message uint32_t bytesRead = 0; - uint8_t led[65]; + uint8_t led[MAX_HID_REPORT_SIZE]; USBDevice::readEP(EP4OUT, led, &bytesRead, MAX_HID_REPORT_SIZE); // start the next read