X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/7eb4eb7cdd1ba6a9a6e1ae82968294445667f2e0..ccf5bd19f2d750440043b242cf26fcda09b69cce:/Bootloaders/DFU/BootloaderDFU.c diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 11177c5a6..6da741e39 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -342,7 +342,7 @@ void EVENT_USB_UnhandledControlPacket(void) } /* Read the flash word and send it via USB to the host */ - #if defined(RAMPZ) + #if (FLASHEND > 0xFFFF) Endpoint_Write_Word_LE(pgm_read_word_far(CurrFlashAddress.Long)); #else Endpoint_Write_Word_LE(pgm_read_word(CurrFlashAddress.Long)); @@ -462,8 +462,10 @@ static void DiscardFillerBytes(uint8_t NumberOfBytes) /* Wait until next data packet received */ while (!(Endpoint_IsOUTReceived())); } - - Endpoint_Discard_Byte(); + else + { + Endpoint_Discard_Byte(); + } } } @@ -585,7 +587,7 @@ static void ProcessMemReadCommand(void) while (CurrFlashAddress < BOOT_START_ADDR) { /* Check if the current byte is not blank */ - #if defined(RAMPZ) + #if (FLASHEND > 0xFFFF) if (pgm_read_byte_far(CurrFlashAddress) != 0xFF) #else if (pgm_read_byte(CurrFlashAddress) != 0xFF)