projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed CDC demo not sending an empty packet after each transfer to prevent the host...
[pub/USBasp.git]
/
Demos
/
Device
/
CDC
/
CDC.c
diff --git
a/Demos/Device/CDC/CDC.c
b/Demos/Device/CDC/CDC.c
index
6e933d5
..
d4eecc8
100644
(file)
--- a/
Demos/Device/CDC/CDC.c
+++ b/
Demos/Device/CDC/CDC.c
@@
-308,6
+308,12
@@
TASK(CDC_Task)
\r
/* Finalize the stream transfer to send the last packet */
\r
Endpoint_ClearCurrentBank();
\r
\r
/* Finalize the stream transfer to send the last packet */
\r
Endpoint_ClearCurrentBank();
\r
+
\r
+ /* Wait until the endpoint is ready for another packet */
\r
+ while (!(Endpoint_ReadWriteAllowed()));
\r
+
\r
+ /* Send an empty packet to ensure that the host does not buffer data sent to it */
\r
+ Endpoint_ClearCurrentBank();
\r
}
\r
\r
/* Select the Serial Rx Endpoint */
\r
}
\r
\r
/* Select the Serial Rx Endpoint */
\r