- while (!(Endpoint_IsOUTReceived()))
- {
- if (USB_DeviceState == DEVICE_STATE_Unattached)
- return;
- }
-
- for (uint8_t i = 0; i < sizeof(LineCoding); i++)
- *(LineCodingData++) = Endpoint_Read_Byte();
-
- Endpoint_ClearOUT();
-
- Endpoint_ClearStatusStage();
- }
-
- break;
- case REQ_SetControlLineState:
- if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
- {
- Endpoint_ClearSETUP();
-
- Endpoint_ClearStatusStage();
+ /* Read the line coding data in from the host into the global struct */
+ Endpoint_Read_Control_Stream_LE(&LineEncoding, sizeof(CDC_Line_Coding_t));
+ Endpoint_ClearIN();