diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2018-04-02 14:51:18 +1000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2018-04-02 14:51:22 +1000 |
commit | 1e9148db894bca208d1076c291e85e134a2f3308 (patch) | |
tree | 532bab8850238b5a22e250e38673f4f6c32954bd /Bootloaders/DFU | |
parent | 0a5848efdc7c979ee23b19df2fd399f93631fa3f (diff) | |
download | lufa-1e9148db894bca208d1076c291e85e134a2f3308.tar.gz lufa-1e9148db894bca208d1076c291e85e134a2f3308.tar.bz2 lufa-1e9148db894bca208d1076c291e85e134a2f3308.zip |
Fix bootloaders incorrectly checking the BOOTRST fuse on start (thanks to Braden Kell).
Diffstat (limited to 'Bootloaders/DFU')
-rw-r--r-- | Bootloaders/DFU/BootloaderDFU.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index cafbd572b..3167c8972 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -133,7 +133,7 @@ void Application_Jump_Check(void) JTAG_ENABLE(); #else /* Check if the device's BOOTRST fuse is set */ - if (BootloaderAPI_ReadFuse(GET_HIGH_FUSE_BITS) & FUSE_BOOTRST) + if (!(BootloaderAPI_ReadFuse(GET_HIGH_FUSE_BITS) & ~FUSE_BOOTRST)) { /* If the reset source was not an external reset or the key is correct, clear it and jump to the application */ if (!(MCUSR & (1 << EXTRF)) || (MagicBootKey == MAGIC_BOOT_KEY)) |