diff --git a/hardware/arduino/avr/libraries/HID/src/HID.cpp b/hardware/arduino/avr/libraries/HID/src/HID.cpp index 21ede269e74..63bbb9bcc83 100644 --- a/hardware/arduino/avr/libraries/HID/src/HID.cpp +++ b/hardware/arduino/avr/libraries/HID/src/HID.cpp @@ -106,17 +106,9 @@ bool HID_::setup(USBSetup& setup) if (requestType == REQUEST_DEVICETOHOST_CLASS_INTERFACE) { - if (request == HID_GET_REPORT) { - // TODO: HID_GetReport(); + if (request == HID_GET_REPORT || request == HID_GET_PROTOCOL) { return true; } - if (request == HID_GET_PROTOCOL) { - // TODO: Send8(protocol); - return true; - } - if (request == HID_GET_IDLE) { - // TODO: Send8(idle); - } } if (requestType == REQUEST_HOSTTODEVICE_CLASS_INTERFACE) @@ -131,16 +123,6 @@ bool HID_::setup(USBSetup& setup) idle = setup.wValueL; return true; } - if (request == HID_SET_REPORT) - { - //uint8_t reportID = setup.wValueL; - //uint16_t length = setup.wLength; - //uint8_t data[length]; - // Make sure to not read more data than USB_EP_SIZE. - // You can read multiple times through a loop. - // The first byte (may!) contain the reportID on a multreport. - //USB_RecvControl(data, length); - } } return false; diff --git a/hardware/arduino/avr/libraries/HID/src/HID.h b/hardware/arduino/avr/libraries/HID/src/HID.h index 93c4bd5b4ee..7fad91f0bf9 100644 --- a/hardware/arduino/avr/libraries/HID/src/HID.h +++ b/hardware/arduino/avr/libraries/HID/src/HID.h @@ -23,6 +23,14 @@ #include #include "PluggableUSB.h" +// The HID class provided in this library is a basic mechanism, designed to let enthusiasts get +// a quick start with their projects. If you need more than what's implemented here (such as +// bi-directional communication with the host), then you should investigate other user-contributed +// libraries. In particular, have a look at: https://github.com/NicoHood/HID/wiki. +// This library contains a number of implementations for Mice, Keyboards and game controllers, +// perhaps one will work directly for you. If not, there are also base classes that you can use +// to get a jump-start on your design. + #if defined(USBCON) #define _USING_HID