/** Current State information structure for \ref USB_ClassInfo_CDC_Device_t CDC device interface structures. */\r
typedef struct\r
{\r
- uint8_t ControlLineState; /**< Current control line states, as set by the host */\r
+ struct\r
+ {\r
+ uint8_t HostToDevice; /**< Control line states from the host to device, as a set of CDC_CONTROL_LINE_OUT_*\r
+ * masks.\r
+ */\r
+ uint8_t DeviceToHost; /**< Control line states from the device to host, as a set of CDC_CONTROL_LINE_IN_*\r
+ * masks.\r
+ */\r
+ } ControlLineStates;\r
\r
struct\r
{\r
/** CDC class driver event for a control line state change on a CDC interface. This event fires each time the host requests a\r
* control line state change (containing the virtual serial control line states, such as DTR) and may be hooked in the\r
* user program by declaring a handler function with the same name and parameters listed here. The new control line states\r
- * are available in the ControlLineState value inside the CDC interface structure passed as a parameter, set as a mask of\r
- * CDC_CONTROL_LINE_OUT_* masks.\r
+ * are available in the ControlLineStates.HostToDevice value inside the CDC interface structure passed as a parameter, set as\r
+ * a mask of CDC_CONTROL_LINE_OUT_* masks.\r
*\r
* \param CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.\r
*/ \r
*/\r
uint8_t CDC_Device_ReceiveByte(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo);\r
\r
- /** Sends a Serial Control Line State Change notification to the host. This should be called when the virtual serial control\r
- * lines (DCD, DSR, etc.) have changed states, or to give BREAK notfications to the host. Line states persist until they are\r
- * cleared via a second notification.\r
+ /** Sends a Serial Control Line State Change notification to the host. This should be called when the virtual serial\r
+ * control lines (DCD, DSR, etc.) have changed states, or to give BREAK notfications to the host. Line states persist\r
+ * until they are cleared via a second notification. This should be called each time the CDC class driver's \r
+ * ControlLineStates.DeviceToHost value is updated to push the new states to the USB host.\r
*\r
* \param CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.\r
- * \param LineStateMask Mask of CDC_CONTROL_LINE_IN_* masks giving the current control line states\r
*/\r
- void CDC_Device_SendControlLineStateChange(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo, uint16_t LineStateMask);\r
+ void CDC_Device_SendControlLineStateChange(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo);\r
\r
/* Private Interface - For use in library only: */\r
#if !defined(__DOXYGEN__)\r