mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-30 06:48:22 +00:00
pl: add debug_read
This commit is contained in:
@@ -102,6 +102,13 @@ pub fn debug_write(c: u8) void {
|
||||
com1_write(c);
|
||||
}
|
||||
|
||||
pub fn debug_read() u8 {
|
||||
while ((amd64.inb(com1 + 0x5) & 0x01) == 0) {
|
||||
std.atomic.spinLoopHint();
|
||||
}
|
||||
return amd64.inb(com1);
|
||||
}
|
||||
|
||||
pub fn arm_timer(deadline: r.Nanoseconds) void {
|
||||
apic.arm_timer(deadline);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user