diff options
author | Federico Fissore <f.fissore@arduino.cc> | 2013-01-28 11:37:51 +0100 |
---|---|---|
committer | Federico Fissore <f.fissore@arduino.cc> | 2013-01-28 11:37:51 +0100 |
commit | 5c67c7e5c674a572dd99e9d0d8c19c718c9985bc (patch) | |
tree | 1f22ba2385ad22eca306d67793c0827451f2b50a /bootloaders/caterina/Caterina.c | |
parent | c453e0a32e7adf5e7bab7bfb7c8f7a21e30ca563 (diff) | |
parent | c6287dd6ac33544179a6544b8f3f55a396ec6608 (diff) |
Merge branch 'ide-1.5.x' into lib-1.5
Diffstat (limited to 'bootloaders/caterina/Caterina.c')
-rw-r--r-- | bootloaders/caterina/Caterina.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootloaders/caterina/Caterina.c b/bootloaders/caterina/Caterina.c index abcba2b..9860b3a 100644 --- a/bootloaders/caterina/Caterina.c +++ b/bootloaders/caterina/Caterina.c @@ -123,11 +123,11 @@ int main(void) if (mcusr_state & (1<<EXTRF)) {
// External reset - we should continue to self-programming mode.
- } else if (mcusr_state == (1<<PORF) && pgm_read_word(0) != 0xFFFF) {
+ } else if ((mcusr_state & (1<<PORF)) && (pgm_read_word(0) != 0xFFFF)) {
// After a power-on reset skip the bootloader and jump straight to sketch
// if one exists.
StartSketch();
- } else if ((mcusr_state == (1<<WDRF)) && (bootKeyPtrVal != bootKey) && (pgm_read_word(0) != 0xFFFF)) {
+ } else if ((mcusr_state & (1<<WDRF)) && (bootKeyPtrVal != bootKey) && (pgm_read_word(0) != 0xFFFF)) {
// If it looks like an "accidental" watchdog reset then start the sketch.
StartSketch();
}
|