aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-01-24 13:38:20 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-01-24 13:38:20 +0000
commit871d9bf1af06fe208ca16cb3b19722bec1300e63 (patch)
tree77f5550a3c8ee63677471cdf4add36d48d448243 /Bootloaders
parentdd995683ea1f233b79724d524a9a3dbcdc171d30 (diff)
downloadlufa-871d9bf1af06fe208ca16cb3b19722bec1300e63.tar.gz
lufa-871d9bf1af06fe208ca16cb3b19722bec1300e63.tar.bz2
lufa-871d9bf1af06fe208ca16cb3b19722bec1300e63.zip
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).
Diffstat (limited to 'Bootloaders')
-rw-r--r--Bootloaders/DFU/BootloaderDFU.c4
1 files changed, 2 insertions, 2 deletions
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);