summaryrefslogtreecommitdiff
path: root/src/host/usbh.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-12 12:01:15 +0700
committerhathach <[email protected]>2018-12-12 12:01:15 +0700
commit6c0b0917e15ca0acf7ce9bed0f3735a794abb807 (patch)
tree0fb72ad69c8c38b5bbee83f3a0e5b63295caed3f /src/host/usbh.c
parent6d86db3977aa60963d78d1bceaa7e3def60f1957 (diff)
rename descriptor_* helper to tu_desc_*
Diffstat (limited to 'src/host/usbh.c')
-rw-r--r--src/host/usbh.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 369ddd2a5..bbe60362a 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -560,9 +560,9 @@ bool enum_task(hcd_event_t* event)
while( p_desc < _usbh_ctrl_buf + ((tusb_desc_configuration_t*)_usbh_ctrl_buf)->wTotalLength )
{
// skip until we see interface descriptor
- if ( TUSB_DESC_INTERFACE != descriptor_type(p_desc) )
+ if ( TUSB_DESC_INTERFACE != tu_desc_type(p_desc) )
{
- p_desc = descriptor_next(p_desc); // skip the descriptor, increase by the descriptor's length
+ p_desc = tu_desc_next(p_desc); // skip the descriptor, increase by the descriptor's length
}else
{
tusb_desc_interface_t* desc_itf = (tusb_desc_interface_t*) p_desc;
@@ -577,7 +577,7 @@ bool enum_task(hcd_event_t* event)
if( drv_id >= USBH_CLASS_DRIVER_COUNT )
{
// skip unsupported class
- p_desc = descriptor_next(p_desc);
+ p_desc = tu_desc_next(p_desc);
}
else
{
@@ -589,7 +589,7 @@ bool enum_task(hcd_event_t* event)
{
// TODO Attach hub to Hub is not currently supported
// skip this interface
- p_desc = descriptor_next(p_desc);
+ p_desc = tu_desc_next(p_desc);
}
else
{
@@ -685,15 +685,15 @@ static void mark_interface_endpoint(uint8_t ep2drv[8][2], uint8_t const* p_desc,
while( len < desc_len )
{
- if ( TUSB_DESC_ENDPOINT == descriptor_type(p_desc) )
+ if ( TUSB_DESC_ENDPOINT == tu_desc_type(p_desc) )
{
uint8_t const ep_addr = ((tusb_desc_endpoint_t const*) p_desc)->bEndpointAddress;
ep2drv[ tu_edpt_number(ep_addr) ][ tu_edpt_dir(ep_addr) ] = driver_id;
}
- len += descriptor_len(p_desc);
- p_desc = descriptor_next(p_desc);
+ len += tu_desc_len(p_desc);
+ p_desc = tu_desc_next(p_desc);
}
}