X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/ed031c1df2f5b053b9cd9f48c63e66a42b7c049e..350141e085d3dcc440962259314f569cc8fcef03:/Demos/Device/CDC/CDC.c 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 */