diff options
| author | hathach <[email protected]> | 2020-04-15 13:53:50 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-04-15 13:53:50 +0700 |
| commit | 93ffe317b262df34afe74e216017411ac70324b5 (patch) | |
| tree | abd0b200d5f325e57c161ef60e98159e7f5a4d90 /src | |
| parent | 3bfb402d8ce0fda082f77d4e552537a51f93375c (diff) | |
clean up
Diffstat (limited to 'src')
| -rw-r--r-- | src/device/usbd.c | 22 |
1 files changed, 0 insertions, 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) { |
