From 871d9bf1af06fe208ca16cb3b19722bec1300e63 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 24 Jan 2010 13:38:20 +0000 Subject: Fixed DFU bootloader programming not discarding the correct number of filler bytes from the host when non-aligned programming ranges are specified (thanks to Thomas Bleeker). --- Bootloaders/DFU/BootloaderDFU.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bootloaders/DFU') diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 553a5a2ef..157b78ffb 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -205,8 +205,8 @@ void EVENT_USB_Device_UnhandledControlRequest(void) /* Throw away the filler bytes before the start of the firmware */ DiscardFillerBytes(DFU_FILLER_BYTES_SIZE); - /* Throw away the page alignment filler bytes before the start of the firmware */ - DiscardFillerBytes(StartAddr % SPM_PAGESIZE); + /* Throw away the packet alignment filler bytes before the start of the firmware */ + DiscardFillerBytes(StartAddr % FIXED_CONTROL_ENDPOINT_SIZE); /* Calculate the number of bytes remaining to be written */ uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1); -- cgit v1.2.3