rename addr variable to avoid conflict with static variable

This commit is contained in:
hathach 2013-02-07 19:42:41 +07:00
parent 89f74d22a7
commit ef0e105da6
1 changed files with 4 additions and 4 deletions

View File

@ -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;
} }