diff options
-rw-r--r-- | LUFA/Doxygen.conf | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/CDC.c | 26 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/CDC.h | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImage.h | 2 |
4 files changed, 19 insertions, 15 deletions
diff --git a/LUFA/Doxygen.conf b/LUFA/Doxygen.conf index 260340c054..9ea64ba73e 100644 --- a/LUFA/Doxygen.conf +++ b/LUFA/Doxygen.conf @@ -1481,4 +1481,4 @@ DOT_CLEANUP = YES # The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index 816a5f13db..aaa821e105 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -143,11 +143,11 @@ uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
if (!(Endpoint_IsReadWriteAllowed()))
- {
- uint8_t ErrorCode;
-
+ {
Endpoint_ClearIN();
+ uint8_t ErrorCode;
+
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
return ErrorCode;
}
@@ -161,20 +161,26 @@ uint8_t CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return ENDPOINT_READYWAIT_NoError;
+ uint8_t ErrorCode;
+
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
+
+ if (!(Endpoint_BytesInEndpoint()))
+ return ENDPOINT_READYWAIT_NoError;
+
+ bool BankFull = !(Endpoint_IsReadWriteAllowed());
- if (Endpoint_BytesInEndpoint())
+ Endpoint_ClearIN();
+
+ if (BankFull)
{
- uint8_t ErrorCode;
-
- Endpoint_ClearIN();
-
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
return ErrorCode;
+
+ Endpoint_ClearIN();
}
- Endpoint_ClearIN();
- return Endpoint_WaitUntilReady();
+ return ENDPOINT_READYWAIT_NoError;
}
uint16_t CDC_Device_BytesReceived(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index 5905474cee..605c3b7e98 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -192,10 +192,8 @@ /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared.
*
* \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
*/
- uint8_t CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+ void CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Sends a Serial Control Line State Change notification to the host. This should be called when the virtual serial
* control lines (DCD, DSR, etc.) have changed states, or to give BREAK notfications to the host. Line states persist
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h index 66dc3925c1..fd67134c14 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.h +++ b/LUFA/Drivers/USB/Class/Host/StillImage.h @@ -181,7 +181,7 @@ /** Receives an asynchronous event block from the device via the asynchronous events pipe.
*
* \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state
- * \param[out] SI_PIMA_Container_t Pointer to a PIMA container structure where the event should be stored
+ * \param[out] PIMAHeader Pointer to a PIMA container structure where the event should be stored
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
* returned a logical command failure
|