mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
f4 usb: fix tracking of OUT requests with data stages
This code was mistakenly tracking the IN (device-to-host) requests with data stages. It should have been tracking the OUT (host-to-device) requests with data stages. This tracking data is important now that CDC is supported. CDC actually uses OUT requests with data stages whereas HID does not. This bug only triggered once CDC was enabled.
This commit is contained in:
parent
b56f5206bd
commit
859734af98
@ -342,7 +342,7 @@ static uint8_t PIOS_USBHOOK_CLASS_Setup(__attribute__((unused)) void *pdev, USB_
|
||||
(usb_if_table[ifnum].ifops && usb_if_table[ifnum].ifops->setup)) {
|
||||
usb_if_table[ifnum].ifops->setup(usb_if_table[ifnum].context,
|
||||
(struct usb_setup_request *)req);
|
||||
if (req->bmRequest & 0x80 && req->wLength > 0) {
|
||||
if (!(req->bmRequest & 0x80) && req->wLength > 0) {
|
||||
/* Request is a host-to-device data setup packet, keep track of the request details for the EP0_RxReady call */
|
||||
usb_ep0_active_req.bmRequestType = req->bmRequest;
|
||||
usb_ep0_active_req.bRequest = req->bRequest;
|
||||
|
Loading…
Reference in New Issue
Block a user