|
|
|
@ -147,11 +147,11 @@ bool BootKeyboard_::setup(USBSetup& setup) {
|
|
|
|
|
|
|
|
|
|
if (requestType == REQUEST_DEVICETOHOST_CLASS_INTERFACE) {
|
|
|
|
|
if (request == HID_GET_REPORT) {
|
|
|
|
|
// TODO: HID_GetReport();
|
|
|
|
|
// TODO(anyone): HID_GetReport();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (request == HID_GET_PROTOCOL) {
|
|
|
|
|
// TODO improve
|
|
|
|
|
// TODO(anyone) improve
|
|
|
|
|
#ifdef __AVR__
|
|
|
|
|
UEDATX = protocol;
|
|
|
|
|
#endif
|
|
|
|
@ -161,7 +161,7 @@ bool BootKeyboard_::setup(USBSetup& setup) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (request == HID_GET_IDLE) {
|
|
|
|
|
// TODO improve
|
|
|
|
|
// TODO(anyone) improve
|
|
|
|
|
#ifdef __AVR__
|
|
|
|
|
UEDATX = idle;
|
|
|
|
|
#endif
|
|
|
|
@ -212,10 +212,8 @@ bool BootKeyboard_::setup(USBSetup& setup) {
|
|
|
|
|
// ------------------------------------------------------------ */
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Input (set HID report)
|
|
|
|
|
else if (setup.wValueH == HID_REPORT_TYPE_INPUT) {
|
|
|
|
|
} else if (setup.wValueH == HID_REPORT_TYPE_INPUT) {
|
|
|
|
|
// Input (set HID report)
|
|
|
|
|
if (length == sizeof(report_)) {
|
|
|
|
|
USB_RecvControl(&report_, length);
|
|
|
|
|
return true;
|
|
|
|
|