aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2009-03-23 05:43:49 +0000
committerDean Camera <[email protected]>2009-03-23 05:43:49 +0000
commit350141e085d3dcc440962259314f569cc8fcef03 (patch)
tree15a5504a171a421d2217e8719c8937c79721a1bf /Demos/Device
parented031c1df2f5b053b9cd9f48c63e66a42b7c049e (diff)
downloadqmk_firmware-350141e085d3dcc440962259314f569cc8fcef03.tar.gz
qmk_firmware-350141e085d3dcc440962259314f569cc8fcef03.zip
Fixed CDC demo not sending an empty packet after each transfer to prevent the host from buffering incomming data.
Altered Project and Bootloader makefiles so that the path to the LUFA library can be set in one place.
Diffstat (limited to 'Demos/Device')
-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 6e933d5813..d4eecc8971 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 */