aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Device/CDC.h
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/Class/Device/CDC.h')
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h
index fb64d9e42..30d3526b3 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.h
+++ b/LUFA/Drivers/USB/Class/Device/CDC.h
@@ -157,6 +157,9 @@
/** Sends a given string to the attached USB host, if connected. If a host is not connected when the function is called, the
* string is discarded.
*
+ * \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
+ * the call will fail.
+ *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state
* \param[in] Data Pointer to the string to send to the host
* \param[in] Length Size in bytes of the string to send to the host
@@ -169,6 +172,9 @@
/** Sends a given byte to the attached USB host, if connected. If a host is not connected when the function is called, the
* byte is discarded.
*
+ * \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
+ * the call will fail.
+ *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state
* \param[in] Data Byte of data to send to the host
*
@@ -178,6 +184,9 @@
/** Determines the number of bytes received by the CDC interface from the host, waiting to be read.
*
+ * \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
+ * the call will fail.
+ *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state
*
* \return Total number of buffered bytes received from the host
@@ -188,6 +197,9 @@
* returns 0. The \ref CDC_Device_BytesReceived() function should be queried before data is received to ensure that no data
* underflow occurs.
*
+ * \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
+ * the call will fail.
+ *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state
*
* \return Next received byte from the host, or 0 if no data received
@@ -196,6 +208,9 @@
/** Flushes any data waiting to be sent, ensuring that the send buffer is cleared.
*
+ * \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
+ * the call will fail.
+ *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state
*
* \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum
@@ -207,6 +222,9 @@
* until they are cleared via a second notification. This should be called each time the CDC class driver's
* ControlLineStates.DeviceToHost value is updated to push the new states to the USB host.
*
+ * \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
+ * the call will fail.
+ *
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state
*/
void CDC_Device_SendControlLineStateChange(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);