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

@@ -11,7 +11,7 @@ struct printer_cfg_priv {
uint8_t port_status;
} usbd_printer_cfg;
static int printer_class_request_handler(struct usb_setup_packet *setup, uint8_t **data, uint32_t *len)
static int printer_class_interface_request_handler(struct usb_setup_packet *setup, uint8_t **data, uint32_t *len)
{
USB_LOG_DBG("Printer Class request: "
"bRequest 0x%02x\r\n",
@@ -54,8 +54,8 @@ struct usbd_interface *usbd_printer_alloc_intf(void)
return NULL;
}
intf->class_handler = printer_class_request_handler;
intf->custom_handler = NULL;
intf->class_interface_handler = printer_class_interface_request_handler;
intf->class_endpoint_handler = NULL;
intf->vendor_handler = NULL;
intf->notify_handler = printer_notify_handler;