]> wirehaze git hosting - stm32f411ceu6.git/blob - sys/core/panic.c

wirehaze git hosting

panic ()
[stm32f411ceu6.git] / sys / core / panic.c
1 #include <panic.h>
2 #include <led.h>
3 #include <uart.h>
4
5 void
6 panic (const char *msg)
7 {
8 asm ("cpsid f");
9
10 led_on ();
11 kputs_busytc ("\r\n\nKernel panic: ");
12 kputs_busytc (msg);
13 kputs_busytc ("\r\n\nStop.");
14
15 while (1)
16 asm ("wfi");
17 }