bdk: usb: revamp hid logic
- Add support for GET REPORT. Allows OS to get a single input report. - Add support for SET_IDLE. Allows OS to control when to send input reports The SET IDLE and the underlying logic change fixes several things: - The old issue of congestion in some systems. - The new bug that would not allow setup packets to be received because mode was set to only send when there are changes. - Now this starts properly as the old code but allows to be changed by OS on demand, while continuing servicing setup packets.
This commit is contained in:
@@ -285,7 +285,7 @@ static void raise_exception(usbd_gadget_ums_t *ums, enum ums_state new_state)
|
||||
|
||||
static void _handle_ep0_ctrl(usbd_gadget_ums_t *ums)
|
||||
{
|
||||
if (usb_ops.usbd_handle_ep0_ctrl_setup())
|
||||
if (usb_ops.usbd_handle_ep0_ctrl_setup(NULL))
|
||||
raise_exception(ums, UMS_STATE_PROTOCOL_RESET);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user