File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ typedef struct {
123
123
124
124
// Invalid driver ID in itf2drv[] ep2drv[][] mapping
125
125
enum { DRVID_INVALID = 0xFFu };
126
- enum { ADDR_INVALID = 0xFFu };
127
126
enum { CONTROLLER_INVALID = 0xFFu };
128
127
129
128
#if CFG_TUSB_DEBUG >= 2
@@ -1434,7 +1433,8 @@ static uint8_t get_new_address(bool is_hub)
1434
1433
{
1435
1434
if (!_usbh_devices [idx ].connected ) return (idx + 1 );
1436
1435
}
1437
- return ADDR_INVALID ;
1436
+
1437
+ return 0 ; // invalid address
1438
1438
}
1439
1439
1440
1440
static bool enum_request_set_addr (void )
@@ -1443,7 +1443,7 @@ static bool enum_request_set_addr(void)
1443
1443
1444
1444
// Get new address
1445
1445
uint8_t const new_addr = get_new_address (desc_device -> bDeviceClass == TUSB_CLASS_HUB );
1446
- TU_ASSERT (new_addr != ADDR_INVALID );
1446
+ TU_ASSERT (new_addr != 0 );
1447
1447
1448
1448
TU_LOG2 ("Set Address = %d\r\n" , new_addr );
1449
1449
You can’t perform that action at this time.
0 commit comments