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.
pull/1469/head
Dean Camera 16 years ago
parent ed031c1df2
commit 350141e085

@ -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 */

File diff suppressed because one or more lines are too long

@ -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.

Loading…
Cancel
Save