projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b221e7d
)
Prevent the CDC Device Class driver from sending empty IN packets on every service...
author
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 10 Sep 2009 06:41:57 +0000
(06:41 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 10 Sep 2009 06:41:57 +0000
(06:41 +0000)
LUFA/Doxygen.conf
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/CDC.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/CDC.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/StillImage.h
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Doxygen.conf
b/LUFA/Doxygen.conf
index
260340c
..
9ea64ba
100644
(file)
--- 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
\r
# used. If set to NO the values of all tags below this one will be ignored.
\r
\r
# The SEARCHENGINE tag specifies whether or not a search engine should be
\r
# used. If set to NO the values of all tags below this one will be ignored.
\r
\r
-SEARCHENGINE =
NO
\r
+SEARCHENGINE =
YES
\r
diff --git
a/LUFA/Drivers/USB/Class/Device/CDC.c
b/LUFA/Drivers/USB/Class/Device/CDC.c
index
816a5f1
..
aaa821e
100644
(file)
--- 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);
\r
\r
if (!(Endpoint_IsReadWriteAllowed()))
\r
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
\r
\r
if (!(Endpoint_IsReadWriteAllowed()))
\r
- {
\r
- uint8_t ErrorCode;
\r
-
\r
+ {
\r
Endpoint_ClearIN();
\r
\r
Endpoint_ClearIN();
\r
\r
+ uint8_t ErrorCode;
\r
+
\r
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
\r
return ErrorCode;
\r
}
\r
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
\r
return ErrorCode;
\r
}
\r
@@
-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))
\r
return ENDPOINT_READYWAIT_NoError;
\r
\r
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
\r
return ENDPOINT_READYWAIT_NoError;
\r
\r
+ uint8_t ErrorCode;
\r
+
\r
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
\r
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
\r
+
\r
+ if (!(Endpoint_BytesInEndpoint()))
\r
+ return ENDPOINT_READYWAIT_NoError;
\r
+
\r
+ bool BankFull = !(Endpoint_IsReadWriteAllowed());
\r
\r
\r
- if (Endpoint_BytesInEndpoint())
\r
+ Endpoint_ClearIN();
\r
+
\r
+ if (BankFull)
\r
{
\r
{
\r
- uint8_t ErrorCode;
\r
-
\r
- Endpoint_ClearIN();
\r
-
\r
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
\r
return ErrorCode;
\r
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
\r
return ErrorCode;
\r
+
\r
+ Endpoint_ClearIN();
\r
}
\r
\r
}
\r
\r
- Endpoint_ClearIN();
\r
- return Endpoint_WaitUntilReady();
\r
+ return ENDPOINT_READYWAIT_NoError;
\r
}
\r
\r
uint16_t CDC_Device_BytesReceived(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
\r
}
\r
\r
uint16_t CDC_Device_BytesReceived(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
\r
diff --git
a/LUFA/Drivers/USB/Class/Device/CDC.h
b/LUFA/Drivers/USB/Class/Device/CDC.h
index
5905474
..
605c3b7
100644
(file)
--- 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.
\r
*
\r
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.
\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
*/
\r
-
uint8_t
CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
\r
+
void
CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
\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
\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
diff --git
a/LUFA/Drivers/USB/Class/Host/StillImage.h
b/LUFA/Drivers/USB/Class/Host/StillImage.h
index
66dc392
..
fd67134
100644
(file)
--- 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.
\r
*
\r
* \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state
\r
/** Receives an asynchronous event block from the device via the asynchronous events pipe.
\r
*
\r
* \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state
\r
- * \param[out]
SI_PIMA_Container_t
Pointer to a PIMA container structure where the event should be stored
\r
+ * \param[out]
PIMAHeader
Pointer to a PIMA container structure where the event should be stored
\r
*
\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
\r
* returned a logical command failure
\r
*
\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
\r
* returned a logical command failure
\r