lufa: Fix mouse Get/SetProtocol
This commit is contained in:
parent
15ca74c8ad
commit
eb3d3b4c29
1 changed files with 4 additions and 0 deletions
|
|
@ -450,6 +450,7 @@ void EVENT_USB_Device_ControlRequest(void)
|
||||||
print("[p]");
|
print("[p]");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#if defined(MOUSE_ENABLE)
|
||||||
if (USB_ControlRequest.wIndex == MOUSE_INTERFACE) {
|
if (USB_ControlRequest.wIndex == MOUSE_INTERFACE) {
|
||||||
Endpoint_ClearSETUP();
|
Endpoint_ClearSETUP();
|
||||||
while (!(Endpoint_IsINReady()));
|
while (!(Endpoint_IsINReady()));
|
||||||
|
|
@ -457,6 +458,7 @@ void EVENT_USB_Device_ControlRequest(void)
|
||||||
Endpoint_ClearIN();
|
Endpoint_ClearIN();
|
||||||
Endpoint_ClearStatusStage();
|
Endpoint_ClearStatusStage();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -473,6 +475,7 @@ void EVENT_USB_Device_ControlRequest(void)
|
||||||
print("[P]");
|
print("[P]");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#if defined(MOUSE_ENABLE)
|
||||||
if (USB_ControlRequest.wIndex == MOUSE_INTERFACE) {
|
if (USB_ControlRequest.wIndex == MOUSE_INTERFACE) {
|
||||||
Endpoint_ClearSETUP();
|
Endpoint_ClearSETUP();
|
||||||
Endpoint_ClearStatusStage();
|
Endpoint_ClearStatusStage();
|
||||||
|
|
@ -480,6 +483,7 @@ void EVENT_USB_Device_ControlRequest(void)
|
||||||
mouse_protocol = (USB_ControlRequest.wValue & 0xFF);
|
mouse_protocol = (USB_ControlRequest.wValue & 0xFF);
|
||||||
clear_keyboard();
|
clear_keyboard();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue