1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20475 from dylad/pr/usbus/fix_get_status_response

sys/usbus: answer get_status if request is standard type
This commit is contained in:
Koen Zandberg 2024-03-18 20:52:03 +00:00 committed by GitHub
commit a365a97f2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}