Fix nasty bug in USBInterrupt.c which would cause a lockup if the control endpoint was not selected at the point the USB endpoint interrupt fires when INTERRUPT_CONTROL_ENDPOINT is defined.
This commit is contained in:
parent
53ebb2f21a
commit
ee5ea4ce2b
2 changed files with 7 additions and 8 deletions
|
@ -183,8 +183,6 @@ static uint32_t ServiceDiscovery_GetDataElementSize(const void** DataElementHead
|
|||
uint8_t SizeIndex = (*((uint8_t*)*DataElementHeader) & 0x07);
|
||||
*DataElementHeader += sizeof(uint8_t);
|
||||
|
||||
*ElementHeaderSize = 1;
|
||||
|
||||
uint32_t ElementValue;
|
||||
|
||||
switch (SizeIndex)
|
||||
|
@ -205,7 +203,8 @@ static uint32_t ServiceDiscovery_GetDataElementSize(const void** DataElementHead
|
|||
*ElementHeaderSize = (1 + sizeof(uint32_t));
|
||||
break;
|
||||
default:
|
||||
ElementValue = (1UL << SizeIndex);
|
||||
ElementValue = (1 << SizeIndex);
|
||||
*ElementHeaderSize = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue