/* Throw away the filler bytes before the start of the firmware */\r
DiscardFillerBytes(DFU_FILLER_BYTES_SIZE);\r
\r
- /* Throw away the page alignment filler bytes before the start of the firmware */\r
- DiscardFillerBytes(StartAddr % SPM_PAGESIZE);\r
+ /* Throw away the packet alignment filler bytes before the start of the firmware */\r
+ DiscardFillerBytes(StartAddr % FIXED_CONTROL_ENDPOINT_SIZE);\r
\r
/* Calculate the number of bytes remaining to be written */\r
uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1);\r
* - Fixed invalid USB controller PLL prescaler values for the ATMEGAxxU2 controllers\r
* - Fixed lack of support for the ATMEGA32U2 in the DFU and CDC class bootloaders\r
* - Fixed Benito project not resetting the target AVR automatically when programming has completed\r
+ * - Fixed DFU bootloader programming not discarding the correct number of filler bytes from the host when non-aligned programming\r
+ * ranges are specified (thanks to Thomas Bleeker)\r
*\r
* \section Sec_ChangeLog091223 Version 091223\r
*\r
FIL TempLogFile;\r
\r
\r
+/** ISR to handle the 500ms ticks for sampling and data logging */\r
ISR(TIMER1_COMPA_vect, ISR_BLOCK)\r
{\r
uint8_t LEDMask = LEDs_GetLEDs();\r
}\r
}\r
\r
+/** Opens the log file on the Dataflash's FAT formatted partition according to the current date */\r
void OpenLogFile(void)\r
{\r
char LogFileName[12];\r
f_lseek(&TempLogFile, TempLogFile.fsize);\r
}\r
\r
+/** Closes the open data log file on the Dataflash's FAT formatted partition */\r
void CloseLogFile(void)\r
{\r
/* Sync any data waiting to be written, unmount the storage device */\r
DS1307_SetDate(ReportParams->Day, ReportParams->Month, ReportParams->Year);\r
DS1307_SetTime(ReportParams->Hour, ReportParams->Minute, ReportParams->Second);\r
\r
+ /* If the logging interval has changed from its current value, write it to EEPROM */\r
if (LoggingInterval500MS_SRAM != ReportParams->LogInterval500MS)\r
{\r
LoggingInterval500MS_SRAM = ReportParams->LogInterval500MS;\r