diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-21 20:48:57 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-21 20:48:57 +0000 |
commit | 5ec9d04bcaa0f48098441f36dd6d048ff32ecb99 (patch) | |
tree | 0edbda5dabbd0fb6295b27aa7db12baa96438f7e /Bootloaders/DFU | |
parent | 5f709e281eec223c5de9766a99bdd54339e149cb (diff) | |
parent | 55283475d3e1c8191b3569524d35066566ceb0e7 (diff) | |
download | lufa-5ec9d04bcaa0f48098441f36dd6d048ff32ecb99.tar.gz lufa-5ec9d04bcaa0f48098441f36dd6d048ff32ecb99.tar.bz2 lufa-5ec9d04bcaa0f48098441f36dd6d048ff32ecb99.zip |
AppConfigHeaders: Merge in latest trunk.
Diffstat (limited to 'Bootloaders/DFU')
-rw-r--r-- | Bootloaders/DFU/BootloaderDFU.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 233e145ae..528e8cb0c 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -106,11 +106,18 @@ uint32_t MagicBootKey ATTR_NO_INIT; */ void Application_Jump_Check(void) { - // If the reset source was the bootloader and the key is correct, clear it and jump to the application + /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) { + /* Turn off the watchdog */ + MCUSR &= ~(1<<WDRF); + wdt_disable(); + + /* Clear the boot key and jump to the user application */ MagicBootKey = 0; - AppStartPtr(); + + // cppcheck-suppress constStatement + ((void (*)(void))0x0000)(); } } |