Commit 350141e0 authored by Dean Camera's avatar Dean Camera
Browse files

Fixed CDC demo not sending an empty packet after each transfer to prevent the...

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.
parent ed031c1d
......@@ -106,17 +106,22 @@ TARGET = BootloaderCDC
OBJDIR = .
# Path to the LUFA library
LUFA_PATH = ../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
../../LUFA/Drivers/USB/LowLevel/LowLevel.c \
../../LUFA/Drivers/USB/LowLevel/Endpoint.c \
../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \
../../LUFA/Drivers/USB/HighLevel/USBTask.c \
../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
../../LUFA/Drivers/USB/HighLevel/Events.c \
../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
SRC = $(TARGET).c \
Descriptors.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/LowLevel.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =
......@@ -148,7 +153,7 @@ DEBUG = dwarf-2
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = ../../
EXTRAINCDIRS = $(LUFA_PATH)/
# Compiler flag to set the C Standard level.
......
......@@ -106,17 +106,22 @@ TARGET = BootloaderDFU
OBJDIR = .
# Path to the LUFA library
LUFA_PATH = ../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
../../LUFA/Drivers/USB/LowLevel/LowLevel.c \
../../LUFA/Drivers/USB/LowLevel/Endpoint.c \
../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \
../../LUFA/Drivers/USB/HighLevel/USBTask.c \
../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
../../LUFA/Drivers/USB/HighLevel/Events.c \
../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
SRC = $(TARGET).c \
Descriptors.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/LowLevel.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =
......@@ -148,7 +153,7 @@ DEBUG = dwarf-2
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = ../../
EXTRAINCDIRS = $(LUFA_PATH)/
# Compiler flag to set the C Standard level.
......
......@@ -106,17 +106,22 @@ TARGET = TeensyHID
OBJDIR = .
# Path to the LUFA library
LUFA_PATH = ../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
../../LUFA/Drivers/USB/LowLevel/LowLevel.c \
../../LUFA/Drivers/USB/LowLevel/Endpoint.c \
../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \
../../LUFA/Drivers/USB/HighLevel/USBTask.c \
../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
../../LUFA/Drivers/USB/HighLevel/Events.c \
../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
SRC = $(TARGET).c \
Descriptors.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/LowLevel.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =
......@@ -148,7 +153,7 @@ DEBUG = dwarf-2
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = ../../
EXTRAINCDIRS = $(LUFA_PATH)/
# Compiler flag to set the C Standard level.
......
......@@ -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 */
......
This diff is collapsed.
......@@ -41,6 +41,7 @@
* - Keyboard and Mouse device demos (normal, data interrupt and fully interrupt driven) combined into unified keyboard and mouse demos
* - Keyboard and Mouse host demos (normal and data interrupt driven) combined into unified keyboard and mouse demos
* - Removed AVRISP_Programmer project due to code quality concerns
* - Fixed CDC demo not sending an empty packet after each transfer to prevent the host from buffering incomming data
*
* \section Sec_ChangeLog090209 Version 090209
*
......
......@@ -118,19 +118,24 @@ TARGET = Magstripe
OBJDIR = .
# Path to the LUFA library
LUFA_PATH = ../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
CircularBitBuffer.c \
../../LUFA/Scheduler/Scheduler.c \
../../LUFA/Drivers/USB/LowLevel/LowLevel.c \
../../LUFA/Drivers/USB/LowLevel/Endpoint.c \
../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \
../../LUFA/Drivers/USB/HighLevel/USBTask.c \
../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
../../LUFA/Drivers/USB/HighLevel/Events.c \
../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
SRC = $(TARGET).c \
Descriptors.c \
CircularBitBuffer.c \
$(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/LowLevel.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/StdDescriptors.c \
# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =
......@@ -162,7 +167,7 @@ DEBUG = dwarf-2
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = ../../
EXTRAINCDIRS = $(LUFA_PATH)/
# Compiler flag to set the C Standard level.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment