Converted Host mode demos to schedulerless. Fixed host mode broken due to earlier...
[pub/USBasp.git] / Bootloaders / DFU / BootloaderDFU.c
index 11177c5..1850803 100644 (file)
@@ -342,7 +342,7 @@ void EVENT_USB_UnhandledControlPacket(void)
                                                }\r
 \r
                                                /* Read the flash word and send it via USB to the host */\r
-                                               #if defined(RAMPZ)\r
+                                               #if (FLASHEND > 0xFFFF)\r
                                                        Endpoint_Write_Word_LE(pgm_read_word_far(CurrFlashAddress.Long));\r
                                                #else\r
                                                        Endpoint_Write_Word_LE(pgm_read_word(CurrFlashAddress.Long));                                                   \r
@@ -585,7 +585,7 @@ static void ProcessMemReadCommand(void)
                while (CurrFlashAddress < BOOT_START_ADDR)\r
                {\r
                        /* Check if the current byte is not blank */\r
-                       #if defined(RAMPZ)\r
+                       #if (FLASHEND > 0xFFFF)\r
                        if (pgm_read_byte_far(CurrFlashAddress) != 0xFF)\r
                        #else\r
                        if (pgm_read_byte(CurrFlashAddress) != 0xFF)\r