diff options
author | Keith Packard <keithp@keithp.com> | 2009-04-14 21:25:15 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-04-14 21:25:15 -0700 |
commit | 4d1091d9bd121f05f5fe0a9c9d2bc0da8c562b9a (patch) | |
tree | bba8f2b2b3cb4bce6052e0bfffa380c8dfefcecf | |
parent | 545478dd02eaeff6a65d318e722b1e4fce5e01b4 (diff) |
Slow down panic code, disable interrupts
-rw-r--r-- | ao_panic.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -20,11 +20,12 @@ static void ao_panic_delay(uint8_t n) { - uint8_t i = 0; + uint8_t i = 0, j = 0; while (n--) - while (--i) - _asm nop _endasm; + while (--j) + while (--i) + _asm nop _endasm; } void @@ -32,7 +33,7 @@ ao_panic(uint8_t reason) { uint8_t n; - for (;;) { + __critical for (;;) { ao_led_on(AO_LED_RED); ao_beep(AO_BEEP_MID); ao_panic_delay(2); |