From 93ffe317b262df34afe74e216017411ac70324b5 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 15 Apr 2020 13:53:50 +0700 Subject: [PATCH] clean up --- src/device/usbd.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/device/usbd.c b/src/device/usbd.c index eabe24be0..4587a2cc7 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -241,8 +241,6 @@ static osal_queue_t _usbd_q; // Prototypes //--------------------------------------------------------------------+ static void mark_interface_endpoint(uint8_t ep2drv[8][2], uint8_t const* p_desc, uint16_t desc_len, uint8_t driver_id); -//static uint8_t find_driver_id(tusb_desc_interface_t const * desc_itf); - static bool process_control_request(uint8_t rhport, tusb_control_request_t const * p_request); static bool process_set_config(uint8_t rhport, uint8_t cfg_num); static bool process_get_descriptor(uint8_t rhport, tusb_control_request_t const * p_request); @@ -772,26 +770,6 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num) return true; } -#if 0 -// Helper to find class driver id for an interface -// return 0xFF if not found -static uint8_t find_driver_id(tusb_desc_interface_t const * desc_itf) -{ - for (uint8_t drv_id = 0; drv_id < USBD_CLASS_DRIVER_COUNT; drv_id++) - { - usbd_class_driver_t const *driver = &_usbd_driver[drv_id]; - if ( (driver->class_code == desc_itf->bInterfaceClass) && // match class code - (driver->subclass == desc_itf->bInterfaceSubClass || driver->all_subclass ) && // match subclass or driver support all - (driver->protocol == desc_itf->bInterfaceProtocol || driver->all_protocol)) // match protocol or driver support all - { - return drv_id; - } - } - - return DRVID_INVALID; -} -#endif - // Helper marking endpoint of interface belongs to class driver static void mark_interface_endpoint(uint8_t ep2drv[8][2], uint8_t const* p_desc, uint16_t desc_len, uint8_t driver_id) {