call usbh_xxx_stop when class enumerates completely
This commit is contained in:
@@ -169,12 +169,13 @@ int usbh_hid_disconnect(struct usbh_hubport *hport, uint8_t intf)
|
||||
usbh_pipe_free(hid_class->intout);
|
||||
}
|
||||
|
||||
usbh_hid_stop(hid_class);
|
||||
if (hport->config.intf[intf].devname[0] != '\0') {
|
||||
USB_LOG_INFO("Unregister HID Class:%s\r\n", hport->config.intf[intf].devname);
|
||||
usbh_hid_stop(hid_class);
|
||||
}
|
||||
|
||||
memset(hid_class, 0, sizeof(struct usbh_hid));
|
||||
usb_free(hid_class);
|
||||
|
||||
if (hport->config.intf[intf].devname[0] != '\0')
|
||||
USB_LOG_INFO("Unregister HID Class:%s\r\n", hport->config.intf[intf].devname);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -182,12 +183,10 @@ int usbh_hid_disconnect(struct usbh_hubport *hport, uint8_t intf)
|
||||
|
||||
__WEAK void usbh_hid_run(struct usbh_hid *hid_class)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
__WEAK void usbh_hid_stop(struct usbh_hid *hid_class)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const struct usbh_class_driver hid_class_driver = {
|
||||
|
||||
Reference in New Issue
Block a user