Completed documentation of the HID device class driver.
[pub/USBasp.git] / Bootloaders / CDC / BootloaderCDC.c
index f36c4fc..d797915 100644 (file)
@@ -119,7 +119,7 @@ int main(void)
 /** Event handler for the USB_Disconnect event. This indicates that the bootloader should exit and the user\r
  *  application started.\r
  */\r
-EVENT_HANDLER(USB_Disconnect)\r
+void EVENT_USB_Disconnect(void)\r
 {\r
        /* Upon disconnection, run user application */\r
        RunBootloader = false;\r
@@ -128,7 +128,7 @@ EVENT_HANDLER(USB_Disconnect)
 /** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready\r
  *  to relay data to and from the attached USB host.\r
  */\r
-EVENT_HANDLER(USB_ConfigurationChanged)\r
+void EVENT_USB_ConfigurationChanged(void)\r
 {\r
        /* Setup CDC Notification, Rx and Tx Endpoints */\r
        Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
@@ -148,7 +148,7 @@ EVENT_HANDLER(USB_ConfigurationChanged)
  *  control requests that are not handled internally by the USB library, so that they can be handled appropriately\r
  *  for the application.\r
  */\r
-EVENT_HANDLER(USB_UnhandledControlPacket)\r
+void EVENT_USB_UnhandledControlPacket(void)\r
 {\r
        uint8_t* LineCodingData = (uint8_t*)&LineCoding;\r
 \r
@@ -248,7 +248,7 @@ static void ReadWriteMemoryBlock(const uint8_t Command)
                        else\r
                        {\r
                                /* Read the next FLASH byte from the current FLASH page */\r
-                               #if defined(RAMPZ)\r
+                               #if (FLASHEND > 0xFFFF)\r
                                WriteNextResponseByte(pgm_read_byte_far(CurrAddress | HighByte));\r
                                #else\r
                                WriteNextResponseByte(pgm_read_byte(CurrAddress | HighByte));                                   \r
@@ -513,7 +513,7 @@ TASK(CDC_Task)
                }\r
                else if (Command == 'R')\r
                {\r
-                       #if defined(RAMPZ)\r
+                       #if (FLASHEND > 0xFFFF)\r
                        uint16_t ProgramWord = pgm_read_word_far(CurrAddress);\r
                        #else\r
                        uint16_t ProgramWord = pgm_read_word(CurrAddress);                      \r