X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/c1a1b6eeecb375259968ef6d989833312047f2d8..7665bf323e76ed1ebcfd137e2ab0bd356b43a5e8:/Bootloaders/CDC/BootloaderCDC.h diff --git a/Bootloaders/CDC/BootloaderCDC.h b/Bootloaders/CDC/BootloaderCDC.h index 0d8f1e3d8..da755936d 100644 --- a/Bootloaders/CDC/BootloaderCDC.h +++ b/Bootloaders/CDC/BootloaderCDC.h @@ -41,12 +41,18 @@ #include #include #include + #include #include #include "Descriptors.h" #include // USB Functionality + /* Preprocessor Checks: */ + #if !defined(SIGNATURE_0) || !defined(SIGNATURE_1) || !defined(SIGNATURE_2) + #error Device signature byte constants are not defined due to outdated avr-libc version. See demo documentation. + #endif + /* Macros: */ /** CDC Class Specific request to get the line encoding on a CDC-ACM virtual serial port, including the * baud rate, parity, stop bits and data bits. @@ -76,17 +82,7 @@ #define BOOTLOADER_HWVERSION_MINOR 0x00 /** Eight character bootloader firmware identifier reported to the host when requested */ - #define SOFTWARE_IDENTIFIER "LUFA-CDC" - - /* Event Handlers: */ - /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */ - HANDLES_EVENT(USB_Disconnect); - - /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */ - HANDLES_EVENT(USB_ConfigurationChanged); - - /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */ - HANDLES_EVENT(USB_UnhandledControlPacket); + #define SOFTWARE_IDENTIFIER "LUFACDC" /* Type Defines: */ /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */ @@ -126,10 +122,14 @@ TASK(CDC_Task); /* Function Prototypes: */ + void EVENT_USB_Disconnect(void); + void EVENT_USB_ConfigurationChanged(void); + void EVENT_USB_UnhandledControlPacket(void); + #if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__) - static void ProgramReadWriteMemoryBlock(const uint8_t Command); + static void ReadWriteMemoryBlock(const uint8_t Command); static uint8_t FetchNextCommandByte(void); - static void WriteNextResponseByte(const uint8_t Response); + static void WriteNextResponseByte(const uint8_t Response); #endif #endif