mirror of
https://github.com/apache/nuttx.git
synced 2026-09-26 01:46:57 +08:00
USB Host function address calculation needs to reset the 'next' address when an address is released
This commit is contained in:
@@ -164,6 +164,13 @@ static void usbhost_devaddr_free(FAR struct usbhost_devaddr_s *devgen,
|
||||
|
||||
DEBUGASSERT((devgen->alloctab[index] |= (1 << bitno)) != 0);
|
||||
devgen->alloctab[index] &= ~(1 << bitno);
|
||||
|
||||
/* Reset the next pointer if the one just released has a lower value */
|
||||
|
||||
if (devaddr < devgen->next)
|
||||
{
|
||||
devgen->next = devaddr;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user