summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-06-15 21:03:56 +0800
committersakumisu <[email protected]>2022-06-15 21:05:23 +0800
commit5904bbd914c0a220749087a6cfdb01e955bd2b70 (patch)
tree1a82b1af288114259d2c46944db2e5284d700fb6
parent0f205de3e35c313b11849687eb57c44db9c3ceed (diff)
remove static class_driver table
-rw-r--r--core/usbh_core.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c
index 26a495b4..a9f93536 100644
--- a/core/usbh_core.c
+++ b/core/usbh_core.c
@@ -25,23 +25,6 @@
struct usbh_class_info *usbh_class_info_table_begin = NULL;
struct usbh_class_info *usbh_class_info_table_end = NULL;
-#ifdef CONFIG_USBHOST_CLASS_DRIVER_EXPORT_DISBALE
-extern const struct usbh_class_info cdc_acm_class_info;
-extern const struct usbh_class_info hid_keyboard_class_info;
-extern const struct usbh_class_info hid_mouse_class_info;
-extern const struct usbh_class_info msc_class_info;
-extern const struct usbh_class_info hub_class_info;
-const struct usbh_class_info *class_info_table[] = {
- &cdc_acm_class_info,
- &hid_keyboard_class_info,
- &hid_mouse_class_info,
- &msc_class_info,
-#ifdef CONFIG_USBHOST_HUB
- &hub_class_info,
-#endif
-};
-#endif
-
static const char *speed_table[] = { "error speed", "low speed", "full speed", "high speed" };
static const struct usbh_class_driver *usbh_find_class_driver(uint8_t class, uint8_t subcalss, uint8_t protocol, uint16_t vid, uint16_t pid);
@@ -746,7 +729,7 @@ static void usbh_portchange_detect_thread(void *argument)
struct usbh_hubport *hport = NULL;
usb_hc_sw_init();
-
+
for (uint8_t port = USBH_HUB_PORT_START_INDEX; port <= CONFIG_USBHOST_RHPORTS; port++) {
usbh_core_cfg.rhport[port - 1].hport.port = port;
usbh_core_cfg.rhport[port - 1].devgen.next = 1;
@@ -829,7 +812,6 @@ int usbh_initialize(void)
memset(&usbh_core_cfg, 0, sizeof(struct usbh_core_priv));
-#ifndef CONFIG_USBHOST_CLASS_DRIVER_EXPORT_DISBALE
#ifdef __ARMCC_VERSION /* ARM C Compiler */
extern const int usbh_class_info$$Base;
extern const int usbh_class_info$$Limit;
@@ -841,10 +823,6 @@ int usbh_initialize(void)
usbh_class_info_table_begin = (struct usbh_class_info *)&_usbh_class_info_start;
usbh_class_info_table_end = (struct usbh_class_info *)&_usbh_class_info_end;
#endif
-#else
- usbh_class_info_table_begin = (struct usbh_class_info *)class_info_table[0];
- usbh_class_info_table_end = (struct usbh_class_info *)(class_info_table[0] + (sizeof(class_info_table) / sizeof(class_info_table[0])));
-#endif
usbh_workq_initialize();