USB Host function address calculation needs to reset the 'next' address when an address is released
This commit is contained in:
parent
47a112974d
commit
9296eca193
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Reference in New Issue