aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/CDC/CDC.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/CDC/CDC.c')
-rw-r--r--Demos/Device/CDC/CDC.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/CDC/CDC.c b/Demos/Device/CDC/CDC.c
index 28bce1ebc..59aa98ceb 100644
--- a/Demos/Device/CDC/CDC.c
+++ b/Demos/Device/CDC/CDC.c
@@ -193,14 +193,14 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_SetControlLineState:
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{
+ /* Acknowledge the SETUP packet, ready for data transfer */
+ Endpoint_ClearSETUP();
+
/* NOTE: Here you can read in the line state mask from the host, to get the current state of the output handshake
lines. The mask is read in from the wValue parameter in USB_ControlRequest, and can be masked against the
CONTROL_LINE_OUT_* masks to determine the RTS and DTR line states using the following code:
*/
- /* Acknowledge the SETUP packet, ready for data transfer */
- Endpoint_ClearSETUP();
-
/* Acknowledge status stage */
while (!(Endpoint_IsINReady()));
Endpoint_ClearIN();