mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-22 19:20:52 +00:00
rename addr variable to avoid conflict with static variable
This commit is contained in:
parent
89f74d22a7
commit
ef0e105da6
@ -228,12 +228,12 @@ tusb_error_t usbh_init(void)
|
||||
//--------------------------------------------------------------------+
|
||||
static inline uint8_t get_new_address(void)
|
||||
{
|
||||
uint8_t new_addr;
|
||||
for (new_addr=1; new_addr <= TUSB_CFG_HOST_DEVICE_MAX; new_addr++)
|
||||
uint8_t addr;
|
||||
for (addr=1; addr <= TUSB_CFG_HOST_DEVICE_MAX; addr++)
|
||||
{
|
||||
if (usbh_device_info_pool[new_addr].status == TUSB_DEVICE_STATUS_UNPLUG)
|
||||
if (usbh_device_info_pool[addr].status == TUSB_DEVICE_STATUS_UNPLUG)
|
||||
break;
|
||||
}
|
||||
return new_addr;
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user