X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/cde2afc50e25054a0ba21c4454e7101d7ac02a35..e331b531c6e6d93eb0eee42b9002074e8090ad18:/LUFA/Drivers/USB/Class/Device/CDC.c diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index ade2a1b50..f0c6edb12 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -65,9 +65,8 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceIn { Endpoint_ClearSETUP(); Endpoint_Read_Control_Stream_LE(&CDCInterfaceInfo->State.LineEncoding, sizeof(CDCInterfaceInfo->State.LineEncoding)); - Endpoint_ClearIN(); - EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo); + Endpoint_ClearIN(); } break; @@ -77,13 +76,23 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceIn Endpoint_ClearSETUP(); CDCInterfaceInfo->State.ControlLineStates.HostToDevice = USB_ControlRequest.wValue; - EVENT_CDC_Device_ControLineStateChanged(CDCInterfaceInfo); Endpoint_ClearStatusStage(); } break; + case REQ_SendBreak: + if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) + { + Endpoint_ClearSETUP(); + + EVENT_CDC_Device_BreakSent(CDCInterfaceInfo, (uint8_t)USB_ControlRequest.wValue); + + Endpoint_ClearStatusStage(); + } + + break; } }