Reduce bootloader magic key to 16 bits to save FLASH space.
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 7 Jul 2012 15:30:35 +0000 (15:30 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 7 Jul 2012 15:30:35 +0000 (15:30 +0000)
Bootloaders/CDC/BootloaderCDC.c
Bootloaders/CDC/BootloaderCDC.h
Bootloaders/DFU/BootloaderDFU.c
Bootloaders/DFU/BootloaderDFU.h
Bootloaders/HID/BootloaderHID.c
Bootloaders/HID/BootloaderHID.h

index dcfa978..af778c7 100644 (file)
@@ -61,7 +61,7 @@ static bool RunBootloader = true;
  *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
  *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
  */
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
 
 
 /** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
index 36af962..d8c9c1c 100644 (file)
@@ -69,7 +69,7 @@
                #define SOFTWARE_IDENTIFIER          "LUFACDC"
 
                /** Magic bootloader key to unlock forced application start mode. */
-               #define MAGIC_BOOT_KEY            0xDC42CACA
+               #define MAGIC_BOOT_KEY               0xDC42
                
        /* Type Defines: */
                /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
index 64850e3..fcacf76 100644 (file)
@@ -97,7 +97,7 @@ static uint16_t EndAddr = 0x0000;
  *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
  *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
  */
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
 
 
 /** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
index ffd330d..8a826f5 100644 (file)
@@ -62,7 +62,7 @@
                #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.
index acc351a..c32dddc 100644 (file)
@@ -46,7 +46,7 @@ static bool RunBootloader = true;
  *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
  *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
  */
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
 
 
 /** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
index af2812a..a281633 100644 (file)
@@ -53,7 +53,7 @@
                #define COMMAND_STARTAPPLICATION   0xFFFF
 
                /** Magic bootloader key to unlock forced application start mode. */
-               #define MAGIC_BOOT_KEY            0xDC42CACA
+               #define MAGIC_BOOT_KEY             0xDC42
                
        /* Function Prototypes: */
                static void SetupHardware(void);