tinyusb/src/device/usbd.c
static void mark_interface_endpoint(uint8_t const* p_desc, uint16_t desc_len, uint8_t driver_id)
{
  uint16_t len = 0;

  while( len < desc_len )
  {
    if ( TUSB_DESC_ENDPOINT == descriptor_type(p_desc) )
    {
      uint8_t const ep_addr = ((tusb_desc_endpoint_t const*) p_desc)->bEndpointAddress;

      _usbd_dev.ep2drv[ edpt_dir(ep_addr) ][ edpt_number(ep_addr) ] = driver_id;
    }

    len   += descriptor_len(p_desc);
    p_desc = descriptor_next(p_desc);
  }
}
// Helper marking endpoint of interface belongs to class driver

Helper marking endpoint of interface belongs to class driver
Helper marking endpoint of interface belongs to class driver
static void mark_interface_endpoint(uint8_t const* p_desc, uint16_t desc_len, uint8_t driver_id)
{
  uint16_t len = 0;
  while( len < desc_len )
  {
    if ( TUSB_DESC_ENDPOINT == descriptor_type(p_desc) )
    {
      uint8_t const ep_addr = ((tusb_desc_endpoint_t const*) p_desc)->bEndpointAddress;
      _usbd_dev.ep2drv[ edpt_dir(ep_addr) ][ edpt_number(ep_addr) ] = driver_id;
    }
    len   += descriptor_len(p_desc);
    p_desc = descriptor_next(p_desc);
  }
}
static void mark_interface_endpoint ( uint8_t const * p_desc , uint16_t desc_len , uint8_t driver_id ) { uint16_t len = 0 ; while ( len < desc_len ) { if ( TUSB_DESC_ENDPOINT == descriptor_type ( p_desc ) ) { uint8_t const ep_addr = ( ( tusb_desc_endpoint_t const * ) p_desc ) -> bEndpointAddress ; _usbd_dev . ep2drv [ edpt_dir ( ep_addr ) ] [ edpt_number ( ep_addr ) ] = driver_id ; } len += descriptor_len ( p_desc ) ; p_desc = descriptor_next ( p_desc ) ; } }
Helper marking endpoint of interface belongs to class driver
Helper marking endpoint of interface belongs to class driver