From e842c512179d3f34731ce78e3a906c5fec162e07 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sat, 4 Dec 2021 19:24:16 -0700 Subject: Created UART console layout --- src/sys/timer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/sys/timer.c') diff --git a/src/sys/timer.c b/src/sys/timer.c index 16e6fdb..13ce317 100644 --- a/src/sys/timer.c +++ b/src/sys/timer.c @@ -5,10 +5,11 @@ #include "../drivers/uart.a.h" #include "../drivers/uart.h" -static unsigned long exe_cnt = 0; -static struct Mutex exe_cnt_m = {.addr = &exe_cnt, .pid = NULL_PID}; +#define TIMER_C +extern char* os_info_v; -//static unsigned long execution_count = 0; +unsigned long exe_cnt = 0; +struct Mutex exe_cnt_m = {.addr = &exe_cnt, .pid = NULL_PID}; void c_timer() { // Reset the counter @@ -24,9 +25,11 @@ void c_timer() { // Lock the execution counter if (lock_mutex(&exe_cnt_m, SCHED_PID) == 0) { *(exe_cnt_m.addr) += 1; - uart_string((char*)"Executed #"); + uart_string("\033[?25l\033[s\033[1;1H\033[91mDendritOS \033[96mv"); + uart_string(os_info_v); + uart_string("\033[0m #"); uart_10(*(exe_cnt_m.addr)); - uart_string((char*)" Times\n"); + uart_string("\033[u\033[?25h"); release_mutex(&exe_cnt_m, SCHED_PID); } } -- cgit v1.2.1