Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when the given data length is zero.
This commit is contained in:
parent
7ef58eef7a
commit
6c38ca2890
7 changed files with 14 additions and 8 deletions
|
@ -2,6 +2,9 @@ uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length)
|
|||
{
|
||||
uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
|
||||
|
||||
if (!(Length))
|
||||
Endpoint_ClearOUT();
|
||||
|
||||
while (Length)
|
||||
{
|
||||
if (Endpoint_IsSETUPReceived())
|
||||
|
|
|
@ -5,7 +5,9 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
|
|||
|
||||
if (Length > USB_ControlRequest.wLength)
|
||||
Length = USB_ControlRequest.wLength;
|
||||
|
||||
else if (!(Length))
|
||||
Endpoint_ClearIN();
|
||||
|
||||
while (Length || LastPacketFull)
|
||||
{
|
||||
if (Endpoint_IsSETUPReceived())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue