aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/CDC/CDC.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/CDC/CDC.c')
-rw-r--r--Demos/Device/CDC/CDC.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Demos/Device/CDC/CDC.c b/Demos/Device/CDC/CDC.c
index 6e933d581..d4eecc897 100644
--- a/Demos/Device/CDC/CDC.c
+++ b/Demos/Device/CDC/CDC.c
@@ -308,6 +308,12 @@ TASK(CDC_Task)
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearCurrentBank();
+
+ /* Wait until the endpoint is ready for another packet */
+ while (!(Endpoint_ReadWriteAllowed()));
+
+ /* Send an empty packet to ensure that the host does not buffer data sent to it */
+ Endpoint_ClearCurrentBank();
}
/* Select the Serial Rx Endpoint */