@@ -195,7 +195,7 @@ enum { CONFIG_NUM = 1 }; // default to use configuration 1
195195// sum of end device + hub
196196#define TOTAL_DEVICES (CFG_TUH_DEVICE_MAX + CFG_TUH_HUB)
197197
198- static uint8_t _usbh_controller = TU_INDEX_INVALID_8 ;
198+ static uint8_t _usbh_controller = TUSB_INDEX_INVALID_8 ;
199199
200200// Device with address = 0 for enumeration
201201static usbh_dev0_t _dev0 ;
@@ -303,13 +303,13 @@ tusb_speed_t tuh_speed_get (uint8_t dev_addr)
303303static void clear_device (usbh_device_t * dev )
304304{
305305 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
308308}
309309
310310bool tuh_inited (void )
311311{
312- return _usbh_controller != TU_INDEX_INVALID_8 ;
312+ return _usbh_controller != TUSB_INDEX_INVALID_8 ;
313313}
314314
315315bool tuh_init (uint8_t controller_id )
@@ -1390,11 +1390,11 @@ static void process_enumeration(tuh_xfer_t* xfer)
13901390
13911391 dev -> configured = 1 ;
13921392
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 )
13941394 // Since driver can perform control transfer within its set_config, this is done asynchronously.
13951395 // 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 );
13981398 }
13991399 break ;
14001400
@@ -1594,7 +1594,7 @@ static bool _parse_configuration_descriptor(uint8_t dev_addr, tusb_desc_configur
15941594 uint8_t const itf_num = desc_itf -> bInterfaceNumber + i ;
15951595
15961596 // 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 ] );
15981598 dev -> itf2drv [itf_num ] = drv_id ;
15991599 }
16001600
@@ -1628,7 +1628,7 @@ void usbh_driver_set_config_complete(uint8_t dev_addr, uint8_t itf_num)
16281628 // IAD binding interface such as CDCs should return itf_num + 1 when complete
16291629 // with usbh_driver_set_config_complete()
16301630 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 )
16321632 {
16331633 usbh_class_driver_t const * driver = & usbh_class_drivers [drv_id ];
16341634 TU_LOG_USBH ("%s set config: itf = %u\r\n" , driver -> name , itf_num );
0 commit comments