projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
545478d
)
Slow down panic code, disable interrupts
author
Keith Packard
<keithp@keithp.com>
Wed, 15 Apr 2009 04:25:15 +0000
(21:25 -0700)
committer
Keith Packard
<keithp@keithp.com>
Wed, 15 Apr 2009 04:25:15 +0000
(21:25 -0700)
ao_panic.c
patch
|
blob
|
history
diff --git
a/ao_panic.c
b/ao_panic.c
index 30ccce60bdc57ba2dd6a05c3d58a9e7466562e92..b486aefbc30313c6775cbe5da338985134c2d874 100644
(file)
--- a/
ao_panic.c
+++ b/
ao_panic.c
@@
-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);