File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ typedef struct {
123123
124124// Invalid driver ID in itf2drv[] ep2drv[][] mapping
125125enum { DRVID_INVALID = 0xFFu };
126- enum { ADDR_INVALID = 0xFFu };
127126enum { CONTROLLER_INVALID = 0xFFu };
128127
129128#if CFG_TUSB_DEBUG >= 2
@@ -1434,7 +1433,8 @@ static uint8_t get_new_address(bool is_hub)
14341433 {
14351434 if (!_usbh_devices [idx ].connected ) return (idx + 1 );
14361435 }
1437- return ADDR_INVALID ;
1436+
1437+ return 0 ; // invalid address
14381438}
14391439
14401440static bool enum_request_set_addr (void )
@@ -1443,7 +1443,7 @@ static bool enum_request_set_addr(void)
14431443
14441444 // Get new address
14451445 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 );
14471447
14481448 TU_LOG2 ("Set Address = %d\r\n" , new_addr );
14491449
You can’t perform that action at this time.
0 commit comments