From 73a80de4228a498b483c8e10ab317920d978d507 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 20 Jan 2022 23:22:42 -0700 Subject: Moved globals to file --- src/util/mutex.c | 1 + src/util/status.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src/util') diff --git a/src/util/mutex.c b/src/util/mutex.c index de7a515..f97760b 100644 --- a/src/util/mutex.c +++ b/src/util/mutex.c @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/src/util/status.c b/src/util/status.c index 7abf931..d07bf0a 100644 --- a/src/util/status.c +++ b/src/util/status.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -93,10 +94,10 @@ void status(void) // Video Status write_string(&g_Drawer, "\nVIDEO: "); write_cstring(&g_Drawer, "Enabled ", 0x00FF00); - write_10(&g_Drawer, width); + write_10(&g_Drawer, gwidth); write_string(&g_Drawer, "x"); - write_10(&g_Drawer, height); - if(isrgb) { + write_10(&g_Drawer, gheight); + if(gisrgb) { write_string(&g_Drawer, " RGB"); } else { write_string(&g_Drawer, " BGR"); @@ -162,13 +163,16 @@ void status(void) "and %0, %0, #3" : "=r"(coren) :: "cc"); write_string(&g_Drawer, "Status Updated by Core #"); write_10(&g_Drawer, coren); - write_string(&g_Drawer, "\nSys Timer Status: "); - coren = *(unsigned long*)SYS_TIMER_CS; + write_string(&g_Drawer, "\nSys Timer Status "); + coren = *(volatile unsigned long*)SYS_TIMER_CS; write_10(&g_Drawer, coren); - write_string(&g_Drawer, " : "); + write_string(&g_Drawer, ":"); unsigned long long tval = get_time(); write_hex32(&g_Drawer, (tval >> 32)); write_hex32(&g_Drawer, tval); + write_string(&g_Drawer, ":"); + coren = *(volatile unsigned long*)SYS_TIMER_C0; + write_10(&g_Drawer, coren); write_char(&g_Drawer, '\n'); write_10(&g_Drawer, ((unsigned long)tval)/1000000); -- cgit v1.2.1