X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/cb7884da506096352ad82a1317b998813b74f4f8..09bedd6555a72c70f6d6bfb965225d44dec171cd:/Bootloaders/DFU/BootloaderDFU.h diff --git a/Bootloaders/DFU/BootloaderDFU.h b/Bootloaders/DFU/BootloaderDFU.h index e996f2b79..11d91db79 100644 --- a/Bootloaders/DFU/BootloaderDFU.h +++ b/Bootloaders/DFU/BootloaderDFU.h @@ -47,12 +47,7 @@ #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 + #include /* Macros: */ /** Configuration define. Define this token to true to case the bootloader to reject all memory commands @@ -81,16 +76,16 @@ /** Convenience macro, used to determine if the issued command is the given one-byte long command. * - * \param dataarr Command byte array to check against - * \param cb1 First command byte to check + * \param[in] dataarr Command byte array to check against + * \param[in] cb1 First command byte to check */ #define IS_ONEBYTE_COMMAND(dataarr, cb1) (dataarr[0] == cb1) /** Convenience macro, used to determine if the issued command is the given two-byte long command. * - * \param dataarr Command byte array to check against - * \param cb1 First command byte to check - * \param cb2 Second command byte to check + * \param[in] dataarr Command byte array to check against + * \param[in] cb1 First command byte to check + * \param[in] cb2 Second command byte to check */ #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == cb1) && (dataarr[1] == cb2)) @@ -191,15 +186,14 @@ errUNKNOWN = 14, errSTALLEDPKT = 15 }; - - /* 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_UnhandledControlPacket event when thrown by the library. */ - HANDLES_EVENT(USB_UnhandledControlPacket); - + /* Function Prototypes: */ + void SetupHardware(void); + void ResetHardware(void); + + void EVENT_USB_Device_Disconnect(void); + void EVENT_USB_Device_UnhandledControlRequest(void); + #if defined(INCLUDE_FROM_BOOTLOADER_C) static void DiscardFillerBytes(uint8_t NumberOfBytes); static void ProcessBootloaderCommand(void);