remove custom handler, split class handler into interface and endpoint

handler
This commit is contained in:
sakumisu
2022-09-08 21:08:39 +08:00
parent de5ca1313a
commit cb2510f121
12 changed files with 78 additions and 91 deletions

View File

@@ -62,7 +62,7 @@ static int hid_custom_request_handler(struct usb_setup_packet *setup, uint8_t **
return -1;
}
static int hid_class_request_handler(struct usb_setup_packet *setup, uint8_t **data, uint32_t *len)
static int hid_class_interface_request_handler(struct usb_setup_packet *setup, uint8_t **data, uint32_t *len)
{
USB_LOG_DBG("HID Class request: "
"bRequest 0x%02x\r\n",
@@ -113,8 +113,8 @@ struct usbd_interface *usbd_hid_alloc_intf(const uint8_t *desc, uint32_t desc_le
return NULL;
}
intf->class_handler = hid_class_request_handler;
intf->custom_handler = hid_custom_request_handler;
intf->class_interface_handler = hid_class_interface_request_handler;
intf->class_endpoint_handler = NULL;
intf->vendor_handler = NULL;
intf->notify_handler = NULL;