2025-05-09 23:16:25 +08:00

13 lines
348 B
Zig

const root = @import("root");
const libk = @import("libk");
const PhysicalAddress = root.machine.memory.PhysicalAddress;
const SerialPort = libk.machine.serial.uart_pl011.SerialPort;
pub var COM1: SerialPort = undefined;
pub fn init() void {
COM1.open(PhysicalAddress.init(0x0900_0000).toAddr());
COM1.init(24000000, 115200) catch {};
}