Removed specialized Endpoint_ClearControl* and Pipe_ClearControl* macros in favour of the standard Endpoint_Clear* and Pipe_Clear* macros (Atmel have confirmed no effect from setting FIFOCON on control endpoints).
This commit is contained in:
parent
ba7cd3f22e
commit
e5e7eaee7a
23 changed files with 169 additions and 228 deletions
|
@ -160,45 +160,45 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
|
|||
case REQ_GetLineEncoding:
|
||||
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
Endpoint_ClearControlSETUP();
|
||||
Endpoint_ClearSETUP();
|
||||
|
||||
for (uint8_t i = 0; i < sizeof(LineCoding); i++)
|
||||
Endpoint_Write_Byte(*(LineCodingData++));
|
||||
|
||||
Endpoint_ClearControlIN();
|
||||
Endpoint_ClearIN();
|
||||
|
||||
/* Acknowledge status stage */
|
||||
while (!(Endpoint_IsOUTReceived()));
|
||||
Endpoint_ClearControlOUT();
|
||||
Endpoint_ClearOUT();
|
||||
}
|
||||
|
||||
break;
|
||||
case REQ_SetLineEncoding:
|
||||
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
Endpoint_ClearControlSETUP();
|
||||
Endpoint_ClearSETUP();
|
||||
|
||||
while (!(Endpoint_IsOUTReceived()));
|
||||
|
||||
for (uint8_t i = 0; i < sizeof(LineCoding); i++)
|
||||
*(LineCodingData++) = Endpoint_Read_Byte();
|
||||
|
||||
Endpoint_ClearControlOUT();
|
||||
Endpoint_ClearOUT();
|
||||
|
||||
/* Acknowledge status stage */
|
||||
while (!(Endpoint_IsINReady()));
|
||||
Endpoint_ClearControlIN();
|
||||
Endpoint_ClearIN();
|
||||
}
|
||||
|
||||
break;
|
||||
case REQ_SetControlLineState:
|
||||
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
Endpoint_ClearControlSETUP();
|
||||
Endpoint_ClearSETUP();
|
||||
|
||||
/* Acknowledge status stage */
|
||||
while (!(Endpoint_IsINReady()));
|
||||
Endpoint_ClearControlIN();
|
||||
Endpoint_ClearIN();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue