aboutsummaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-23 13:37:10 -0800
committerChristian Cunningham <cc@localhost>2021-12-23 13:37:10 -0800
commit96f5bdd43e12c1c26e65e3a8e8d9ab0b95cd506e (patch)
treee30d2b254d6c09d03759e938b5c39e14a9df4447 /src/sys
parent9130122609599f14f30fd6d2b32d15865cc8dfe3 (diff)
Fixed Global Drawer Initialization
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/timer.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/sys/timer.c b/src/sys/timer.c
index ff55bd4..8e333c4 100644
--- a/src/sys/timer.c
+++ b/src/sys/timer.c
@@ -15,27 +15,31 @@ void c_timer() {
// Reset the counter
write_cntv_tval(cntfrq);
- // Output the value
- //uart_string((char*)"Timer Value: ");
- //unsigned long v = read_cntv_tval();
- //uart_10(v);
- //uart_char(0x20);
- //uart_hexn(v);
-
- // Lock the execution counter
unsigned int x = g_Drawer.x;
unsigned int y = g_Drawer.y;
g_Drawer.x = 0;
g_Drawer.y = 0;
+
+ // Lock the execution counter
if (lock_mutex(&exe_cnt_m, SCHED_PID) == 0) {
*(exe_cnt_m.addr) += 1;
- write_cstring(&g_Drawer, "DendritOS", 0xDF0000);
- write_cstring(&g_Drawer, " v", 0x00DF00);
- write_cstring(&g_Drawer, os_info_v, 0x00DF00);
+ write_cstring(&g_Drawer, "DendritOS", 0xFF0000);
+ write_cstring(&g_Drawer, " v", 0x00FF00);
+ write_cstring(&g_Drawer, os_info_v, 0x00FF00);
write_string(&g_Drawer, " #");
write_10(&g_Drawer, *(exe_cnt_m.addr));
release_mutex(&exe_cnt_m, SCHED_PID);
}
+
+ g_Drawer.x = 0;
+ g_Drawer.y = 10;
+ // Output the value
+ write_string(&g_Drawer, "Timer Value: ");
+ unsigned long v = read_cntv_tval();
+ write_10(&g_Drawer, v);
+ write_string(&g_Drawer, " | ");
+ write_hex32(&g_Drawer, v);
+
g_Drawer.x = x;
g_Drawer.y = y;
}