Skip to content

Commit

Permalink
sys/usbus: answer get_status if request is standard type
Browse files Browse the repository at this point in the history
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
  • Loading branch information
dylad committed Mar 17, 2024
1 parent db51ad7 commit f44ef81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sys/usb/usbus/usbus_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,11 @@ static int _recv_interface_setup(usbus_t *usbus, usb_setup_t *pkt)
usbus_control_handler_t *ep0_handler =
(usbus_control_handler_t *)usbus->control;
uint16_t destination = pkt->index & 0x0f;
uint8_t type_mask = pkt->type & USB_SETUP_REQUEST_TYPE_MASK;

/* Globally handle the iface get status request */
if (pkt->request == USB_SETUP_REQ_GET_STATUS) {
if (pkt->request == USB_SETUP_REQ_GET_STATUS &&
type_mask == USB_SETUP_REQUEST_TYPE_STANDARD) {
return _req_iface_status(usbus);
}

Expand Down

0 comments on commit f44ef81

Please sign in to comment.