Added return values to the CDC and MIDI class driver transmit functions.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / CDC.h
index a58bea2..99f8eb2 100644 (file)
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.\r
                         *  \param[in] Data  Pointer to the string to send to the host\r
                         *  \param[in] Length  Size in bytes of the string to send to the host\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum\r
                         */\r
-                       void CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, char* const Data, const uint16_t Length);\r
+                       uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, char* const Data, const uint16_t Length);\r
                        \r
                        /** Sends a given byte to the attached USB host, if connected. If a host is not connected when the function is called, the\r
                         *  byte is discarded.\r
                         *\r
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.\r
                         *  \param[in] Data  Byte of data to send to the host\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum\r
                         */\r
-                       void CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Data);\r
+                       uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Data);\r
                        \r
                        /** Determines the number of bytes received by the CDC interface from the host, waiting to be read.\r
                         *\r
                        /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared.\r
                         *\r
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.\r
+                        *\r
+                        *  \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum\r
                         */\r
-                       void CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);\r
+                       uint8_t CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);\r
                        \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