Fixed bug in RNDISEthernet and DualCDC demos not using the correct USB_ControlRequest...
[pub/USBasp.git] / Bootloaders / CDC / BootloaderCDC.h
index 0d8f1e3..e302a39 100644 (file)
                #include <avr/wdt.h>\r
                #include <avr/boot.h>\r
                #include <avr/eeprom.h>\r
+               #include <avr/power.h>\r
                #include <stdbool.h>\r
 \r
                #include "Descriptors.h"\r
 \r
                #include <LUFA/Drivers/USB/USB.h>                // USB Functionality\r
 \r
+       /* Preprocessor Checks: */\r
+               #if !defined(SIGNATURE_0) || !defined(SIGNATURE_1) || !defined(SIGNATURE_2)\r
+                       #error Device signature byte constants are not defined due to outdated avr-libc version. See demo documentation.\r
+               #endif\r
+\r
        /* Macros: */\r
                /** CDC Class Specific request to get the line encoding on a CDC-ACM virtual serial port, including the\r
                 *  baud rate, parity, stop bits and data bits.\r
@@ -76,7 +82,7 @@
                #define BOOTLOADER_HWVERSION_MINOR   0x00\r
 \r
                /** Eight character bootloader firmware identifier reported to the host when requested */\r
-               #define SOFTWARE_IDENTIFIER          "LUFA-CDC"\r
+               #define SOFTWARE_IDENTIFIER          "LUFACDC"\r
 \r
        /* Event Handlers: */\r
                /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */\r
 \r
        /* Function Prototypes: */\r
                #if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__)\r
-                       static void ProgramReadWriteMemoryBlock(const uint8_t Command);\r
+                       static void    ReadWriteMemoryBlock(const uint8_t Command);\r
                        static uint8_t FetchNextCommandByte(void);\r
-                       static void WriteNextResponseByte(const uint8_t Response);\r
+                       static void    WriteNextResponseByte(const uint8_t Response);\r
                #endif\r
 \r
 #endif\r