From 61e82e0eebe0d96a39e74576c5b3f9520144ac8e Mon Sep 17 00:00:00 2001 From: sakimisu <1203593632@qq.com> Date: Mon, 21 Nov 2022 21:59:37 +0800 Subject: [PATCH] remove device mount and unmount callback --- class/hub/usbh_hub.c | 1 - core/usbh_core.c | 11 +---------- core/usbh_core.h | 3 --- demo/usb_host.c | 8 -------- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c index b6211217..d4dc216c 100644 --- a/class/hub/usbh_hub.c +++ b/class/hub/usbh_hub.c @@ -511,7 +511,6 @@ static void usbh_hub_events(struct usbh_hub *hub) } USB_LOG_INFO("Device on Hub %u, Port %u disconnected\r\n", hub->index, port + 1); - usbh_device_unmount_done_callback(child); child->config.config_desc.bNumInterfaces = 0; } } diff --git a/core/usbh_core.c b/core/usbh_core.c index b90eb2f5..6869bfbb 100644 --- a/core/usbh_core.c +++ b/core/usbh_core.c @@ -623,7 +623,6 @@ int usbh_enumerate(struct usbh_hubport *hport) } } - usbh_device_mount_done_callback(hport); errout: if (ret < 0) { usbh_hport_deactivate_ep0(hport); @@ -794,12 +793,4 @@ int lsusb(int argc, char **argv) } return 0; -} - -__WEAK void usbh_device_mount_done_callback(struct usbh_hubport *hport) -{ -} - -__WEAK void usbh_device_unmount_done_callback(struct usbh_hubport *hport) -{ -} +} \ No newline at end of file diff --git a/core/usbh_core.h b/core/usbh_core.h index ce5090e7..39f9ad9b 100644 --- a/core/usbh_core.h +++ b/core/usbh_core.h @@ -181,9 +181,6 @@ int usbh_initialize(void); struct usbh_hubport *usbh_find_hubport(uint8_t dev_addr); void *usbh_find_class_instance(const char *devname); -void usbh_device_mount_done_callback(struct usbh_hubport *hport); -void usbh_device_unmount_done_callback(struct usbh_hubport *hport); - int lsusb(int argc, char **argv); #ifdef __cplusplus } diff --git a/demo/usb_host.c b/demo/usb_host.c index 74643d30..aec7af46 100644 --- a/demo/usb_host.c +++ b/demo/usb_host.c @@ -241,14 +241,6 @@ int video_test(void) return ret; } -void usbh_device_mount_done_callback(struct usbh_hubport *hport) -{ -} - -void usbh_device_unmount_done_callback(struct usbh_hubport *hport) -{ -} - static void usbh_class_test_thread(void *argument) { while (1) {