X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..5fc294a6503d48b422ce67438d703bdd647de146:/LUFA/Drivers/USB/Class/Device/CDC.h diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index fb64d9e42..617410b11 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -155,7 +155,12 @@ void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** 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. + * string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the + * \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be + * packed into a single endpoint packet, increasing data throughput. + * + * \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 @@ -167,7 +172,12 @@ ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); /** 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. + * byte is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the + * \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be + * packed into a single endpoint packet, increasing data throughput. + * + * \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 +188,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 +201,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 +212,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 +226,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);