From 592c6992c7ea0c2e4cbea79fadb1c845f2fc050e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 5 May 2025 09:54:48 -0400 Subject: pc spkr --- kernel/lib/panic.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'kernel/lib/panic.c') diff --git a/kernel/lib/panic.c b/kernel/lib/panic.c index 3a6e029..35ea0b1 100644 --- a/kernel/lib/panic.c +++ b/kernel/lib/panic.c @@ -1,6 +1,8 @@ #include #include #include +#include +#include __attribute__((noreturn)) void __panic(unsigned int line, const char *file, const char *format, ...) @@ -16,6 +18,17 @@ __attribute__((noreturn)) void __panic(unsigned int line, const char *file, log_backtrace(); #endif - while (1) - halt(); + fatal_loop(); +} + +__attribute__((noreturn)) void fatal_loop(void) +{ + while(1) { + spkr_play_tone(1000); + ps2_set_leds(0x4); + kspin_milliseconds(200); + spkr_quiet(); + ps2_set_leds(0x0); + kspin_milliseconds(800); + } } -- cgit v1.2.3-freya