mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-01 19:20:35 +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)
|
static inline uint8_t get_new_address(void)
|
||||||
{
|
{
|
||||||
uint8_t new_addr;
|
uint8_t addr;
|
||||||
for (new_addr=1; new_addr <= TUSB_CFG_HOST_DEVICE_MAX; new_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;
|
break;
|
||||||
}
|
}
|
||||||
return new_addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user