Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / CDC.c
index e1cb554..f0c6edb 100644 (file)
@@ -65,9 +65,8 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceIn
                        {\r
                                Endpoint_ClearSETUP();\r
                                Endpoint_Read_Control_Stream_LE(&CDCInterfaceInfo->State.LineEncoding, sizeof(CDCInterfaceInfo->State.LineEncoding));\r
-                               Endpoint_ClearIN();\r
-\r
                                EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo);\r
+                               Endpoint_ClearIN();\r
                        }\r
        \r
                        break;\r
@@ -77,7 +76,6 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceIn
                                Endpoint_ClearSETUP();\r
                                \r
                                CDCInterfaceInfo->State.ControlLineStates.HostToDevice = USB_ControlRequest.wValue;\r
-                               \r
                                EVENT_CDC_Device_ControLineStateChanged(CDCInterfaceInfo);\r
 \r
                                Endpoint_ClearStatusStage();\r