Partial Commit: Remove now empty Projects\Incomplete directory and add the new AVRISP...
[pub/USBasp.git] / Bootloaders / CDC / BootloaderCDC.c
index 6769a0c..f925956 100644 (file)
@@ -235,15 +235,7 @@ static void ReadWriteMemoryBlock(const uint8_t Command)
 \r
                while (BlockSize--)\r
                {\r
 \r
                while (BlockSize--)\r
                {\r
-                       if (MemoryType == 'E')\r
-                       {\r
-                               /* Read the next EEPROM byte into the endpoint */\r
-                               WriteNextResponseByte(eeprom_read_byte((uint8_t*)(uint16_t)(CurrAddress >> 1)));\r
-\r
-                               /* Increment the address counter after use */\r
-                               CurrAddress += 2;\r
-                       }\r
-                       else\r
+                       if (MemoryType == 'F')\r
                        {\r
                                /* Read the next FLASH byte from the current FLASH page */\r
                                #if (FLASHEND > 0xFFFF)\r
                        {\r
                                /* Read the next FLASH byte from the current FLASH page */\r
                                #if (FLASHEND > 0xFFFF)\r
@@ -258,6 +250,14 @@ static void ReadWriteMemoryBlock(const uint8_t Command)
                                \r
                                HighByte = !HighByte;\r
                        }\r
                                \r
                                HighByte = !HighByte;\r
                        }\r
+                       else\r
+                       {\r
+                               /* Read the next EEPROM byte into the endpoint */\r
+                               WriteNextResponseByte(eeprom_read_byte((uint8_t*)(uint16_t)(CurrAddress >> 1)));\r
+\r
+                               /* Increment the address counter after use */\r
+                               CurrAddress += 2;\r
+                       }                       \r
                }\r
        }\r
        else\r
                }\r
        }\r
        else\r