When debugging, send ao_panic message to ao_debug_out
authorKeith Packard <keithp@keithp.com>
Mon, 19 Mar 2012 05:08:48 +0000 (22:08 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 29 Mar 2012 04:37:02 +0000 (21:37 -0700)
Use the low-level debug hooks to get the panic state sent to the
serial port.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_panic.c

index 244917a8af9a32a44c0bc1bc756bee7f00750f90..25dc145eea69ecd9c3b7320bee32a4b43b3f67f7 100644 (file)
@@ -45,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++) {