summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-10 05:07:22 +0700
committerhathach <[email protected]>2018-12-10 05:07:22 +0700
commit6a6e7d0ecb6690c5bc833f6d543c5303b6b52155 (patch)
treee7a30706b2d8db7e4de714e70977fd14fd50a4c1 /src/device
parent05913a73501c8e2ea1a88299f6b900f92307aaa7 (diff)
refactor usbh class driver
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 121ee3da9..44bd641dc 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -450,19 +450,19 @@ static bool process_set_config(uint8_t rhport)
{
if ( usbd_class_drivers[drv_id].class_code == desc_itf->bInterfaceClass ) break;
}
- TU_ASSERT( drv_id < USBD_CLASS_DRIVER_COUNT ); // unsupported class
+ TU_ASSERT( drv_id < USBD_CLASS_DRIVER_COUNT );
// Interface number must not be used already TODO alternate interface
TU_ASSERT( 0xff == _usbd_dev.itf2drv[desc_itf->bInterfaceNumber] );
_usbd_dev.itf2drv[desc_itf->bInterfaceNumber] = drv_id;
- uint16_t len=0;
- TU_ASSERT_ERR( usbd_class_drivers[drv_id].open( rhport, desc_itf, &len ), false );
- TU_ASSERT( len >= sizeof(tusb_desc_interface_t) );
+ uint16_t itf_len=0;
+ TU_ASSERT_ERR( usbd_class_drivers[drv_id].open( rhport, desc_itf, &itf_len ), false );
+ TU_ASSERT( itf_len >= sizeof(tusb_desc_interface_t) );
- mark_interface_endpoint(p_desc, len, drv_id);
+ mark_interface_endpoint(p_desc, itf_len, drv_id);
- p_desc += len; // next interface
+ p_desc += itf_len; // next interface
}
}