diff options
Diffstat (limited to 'Demos')
-rw-r--r-- | Demos/Device/CDC/CDC.c | 6 |
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 */
|