X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_panic.c;h=25dc145eea69ecd9c3b7320bee32a4b43b3f67f7;hb=7f64e62356bcfcd6ba8a88b09251793481bcd56c;hp=0668dad26bb3c6e4bcecae1dee87a85b9796dde8;hpb=8125acc030574afed6f23aa8aa302d9c768bb04e;p=fw%2Faltos diff --git a/src/core/ao_panic.c b/src/core/ao_panic.c index 0668dad2..25dc145e 100644 --- a/src/core/ao_panic.c +++ b/src/core/ao_panic.c @@ -24,6 +24,10 @@ #if !HAS_BEEP #define ao_beep(x) #endif +#if !LEDS_AVAILABLE +#define ao_led_on(x) +#define ao_led_off(x) +#endif static void ao_panic_delay(uint8_t n) @@ -41,6 +45,10 @@ ao_panic(uint8_t reason) { uint8_t n; +#if LOW_LEVEL_DEBUG + ao_cur_task = NULL; + printf ("panic %d\n", reason); +#endif __critical for (;;) { ao_panic_delay(20); for (n = 0; n < 5; n++) { @@ -54,6 +62,9 @@ ao_panic(uint8_t reason) ao_beep(AO_BEEP_OFF); ao_panic_delay(2); +#ifdef SDCC +#pragma disable_warning 126 +#endif for (n = 0; n < reason; n++) { ao_led_on(AO_LED_RED); ao_beep(AO_BEEP_MID);