diff options
| author | Keith Packard <keithp@keithp.com> | 2012-08-31 21:01:21 -0500 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-08-31 21:01:21 -0500 | 
| commit | f9af7819de086d9179c3a4d1df7c88ab67a7d7c7 (patch) | |
| tree | 03588676c8870085ada79d53e39208ade02cac08 /src/core/ao_panic.c | |
| parent | 6d8858ca1899c8b64f107ebb45711efbb7b8d62a (diff) | |
altos: Add custom panic noise for self-test failures
Make it easier to tell which component is failing self test
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_panic.c')
| -rw-r--r-- | src/core/ao_panic.c | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/ao_panic.c b/src/core/ao_panic.c index 25dc145e..52433044 100644 --- a/src/core/ao_panic.c +++ b/src/core/ao_panic.c @@ -65,7 +65,15 @@ ao_panic(uint8_t reason)  #ifdef SDCC  #pragma disable_warning 126  #endif -		for (n = 0; n < reason; n++) { +		if (reason & 0x40) { +			ao_led_on(AO_LED_RED); +			ao_beep(AO_BEEP_HIGH); +			ao_panic_delay(40); +			ao_led_off(AO_LED_RED); +			ao_beep(AO_BEEP_OFF); +			ao_panic_delay(10); +		} +		for (n = 0; n < (reason & 0x3f); n++) {  			ao_led_on(AO_LED_RED);  			ao_beep(AO_BEEP_MID);  			ao_panic_delay(10);  | 
