Arnaud VALLEY / Mbed 2 deprecated Pinscape_Controller_V2_arnoz

Dependencies:   mbed FastIO FastPWM USBDevice

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