mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
clean up
This commit is contained in:
parent
3bfb402d8c
commit
93ffe317b2
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user