diff options
Diffstat (limited to 'bootloaders/caterina/Caterina.c')
-rwxr-xr-x | 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 100755 --- 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();
}
|