@@ -195,7 +195,7 @@ enum { CONFIG_NUM = 1 }; // default to use configuration 1
195
195
// sum of end device + hub
196
196
#define TOTAL_DEVICES (CFG_TUH_DEVICE_MAX + CFG_TUH_HUB)
197
197
198
- static uint8_t _usbh_controller = TU_INDEX_INVALID_8 ;
198
+ static uint8_t _usbh_controller = TUSB_INDEX_INVALID_8 ;
199
199
200
200
// Device with address = 0 for enumeration
201
201
static usbh_dev0_t _dev0 ;
@@ -303,13 +303,13 @@ tusb_speed_t tuh_speed_get (uint8_t dev_addr)
303
303
static void clear_device (usbh_device_t * dev )
304
304
{
305
305
tu_memclr (dev , sizeof (usbh_device_t ));
306
- memset (dev -> itf2drv , TU_INDEX_INVALID_8 , sizeof (dev -> itf2drv )); // invalid mapping
307
- memset (dev -> ep2drv , TU_INDEX_INVALID_8 , sizeof (dev -> ep2drv )); // invalid mapping
306
+ memset (dev -> itf2drv , TUSB_INDEX_INVALID_8 , sizeof (dev -> itf2drv )); // invalid mapping
307
+ memset (dev -> ep2drv , TUSB_INDEX_INVALID_8 , sizeof (dev -> ep2drv )); // invalid mapping
308
308
}
309
309
310
310
bool tuh_inited (void )
311
311
{
312
- return _usbh_controller != TU_INDEX_INVALID_8 ;
312
+ return _usbh_controller != TUSB_INDEX_INVALID_8 ;
313
313
}
314
314
315
315
bool tuh_init (uint8_t controller_id )
@@ -1390,11 +1390,11 @@ static void process_enumeration(tuh_xfer_t* xfer)
1390
1390
1391
1391
dev -> configured = 1 ;
1392
1392
1393
- // Start the Set Configuration process for interfaces (itf = TU_INDEX_INVALID_8 )
1393
+ // Start the Set Configuration process for interfaces (itf = TUSB_INDEX_INVALID_8 )
1394
1394
// Since driver can perform control transfer within its set_config, this is done asynchronously.
1395
1395
// The process continue with next interface when class driver complete its sequence with usbh_driver_set_config_complete()
1396
- // TODO use separated API instead of using TU_INDEX_INVALID_8
1397
- usbh_driver_set_config_complete (daddr , TU_INDEX_INVALID_8 );
1396
+ // TODO use separated API instead of using TUSB_INDEX_INVALID_8
1397
+ usbh_driver_set_config_complete (daddr , TUSB_INDEX_INVALID_8 );
1398
1398
}
1399
1399
break ;
1400
1400
@@ -1594,7 +1594,7 @@ static bool _parse_configuration_descriptor(uint8_t dev_addr, tusb_desc_configur
1594
1594
uint8_t const itf_num = desc_itf -> bInterfaceNumber + i ;
1595
1595
1596
1596
// Interface number must not be used already
1597
- TU_ASSERT ( TU_INDEX_INVALID_8 == dev -> itf2drv [itf_num ] );
1597
+ TU_ASSERT ( TUSB_INDEX_INVALID_8 == dev -> itf2drv [itf_num ] );
1598
1598
dev -> itf2drv [itf_num ] = drv_id ;
1599
1599
}
1600
1600
@@ -1628,7 +1628,7 @@ void usbh_driver_set_config_complete(uint8_t dev_addr, uint8_t itf_num)
1628
1628
// IAD binding interface such as CDCs should return itf_num + 1 when complete
1629
1629
// with usbh_driver_set_config_complete()
1630
1630
uint8_t const drv_id = dev -> itf2drv [itf_num ];
1631
- if (drv_id != TU_INDEX_INVALID_8 )
1631
+ if (drv_id != TUSB_INDEX_INVALID_8 )
1632
1632
{
1633
1633
usbh_class_driver_t const * driver = & usbh_class_drivers [drv_id ];
1634
1634
TU_LOG_USBH ("%s set config: itf = %u\r\n" , driver -> name , itf_num );
0 commit comments