Add console header line

This commit is contained in:
josh committed 2023-10-21 17:08:45 -04:00
1 parent 4273c703e9
commit 8638840cd8
3 files changed
+64 -11

No files matched your search

+3 -6
View File
@@ -5,6 +5,7 @@ module hulk.rtc;
import hulk.cpu;
import hulk.klog;
import hulk.console;
struct Rtc
{
@@ -51,11 +52,6 @@ struct Rtc
rtc_24hour_mode = (sr_b & SR_B_24HOUR) != 0u;
rtc_binary_mode = (sr_b & SR_B_BINARY) != 0u;
/* Read the current system time. */
time t = read_rtc_time();
Klog.writefln("System time is 20%02u-%02u-%02u %02u:%02u:%02u",
t.year, t.month, t.day, t.hour, t.minute, t.second);
/* Send EOI to enable more RTC interrupts and re-enable NMIs. */
eoi();
}
@@ -86,11 +82,12 @@ struct Rtc
if ((count % 1024) == 0u)
{
seconds++;
Console.update_header();
}
eoi();
}
private static time read_rtc_time()
public static time read_rtc_time()
{
time[2] times;
size_t reads;