X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/c3dd6ac7814ce17004a9e4f0d965d606b1d7c35c..refs/heads/master:/Bootloaders/DFU/BootloaderDFU.h diff --git a/Bootloaders/DFU/BootloaderDFU.h b/Bootloaders/DFU/BootloaderDFU.h index ffd330d7f..549ceed06 100644 --- a/Bootloaders/DFU/BootloaderDFU.h +++ b/Bootloaders/DFU/BootloaderDFU.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2012. + Copyright (C) Dean Camera, 2021. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2021 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -18,7 +18,7 @@ advertising or publicity pertaining to distribution of the software without specific, written prior permission. - The author disclaim all warranties with regard to this + The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages @@ -53,6 +53,12 @@ #include #include + #include + + /* Preprocessor Checks: */ + #if !defined(__OPTIMIZE_SIZE__) + #error This bootloader requires that it be optimized for size, not speed, to fit into the target device. Change optimization settings and try again. + #endif /* Macros: */ /** Major bootloader version number. */ @@ -60,9 +66,9 @@ /** Minor bootloader version number. */ #define BOOTLOADER_VERSION_REV 0 - + /** Magic bootloader key to unlock forced application start mode. */ - #define MAGIC_BOOT_KEY 0xDC42CACA + #define MAGIC_BOOT_KEY 0xDC42 /** Complete bootloader version number expressed as a packed byte, constructed from the * two individual bootloader version macros. @@ -164,7 +170,7 @@ dfuMANIFEST = 7, dfuMANIFEST_WAIT_RESET = 8, dfuUPLOAD_IDLE = 9, - dfuERROR = 10 + dfuERROR = 10 }; /** DFU command status error codes. Refer to the DFU class specification for information on each error code. */ @@ -185,7 +191,7 @@ errUSBR = 12, errPOR = 13, errUNKNOWN = 14, - errSTALLEDPKT = 15 + errSTALLEDPKT = 15 }; /* Function Prototypes: */ @@ -203,7 +209,7 @@ static void ProcessWriteCommand(void); static void ProcessReadCommand(void); #endif - + void Application_Jump_Check(void) ATTR_INIT_SECTION(3); #endif