Starting work on a PS2 keyboard driver.

This commit is contained in:
neviyn 2017-10-22 21:18:01 +01:00
parent c98464d1c7
commit e636f24995

16
kernel/arch/i386/ps2.nim Normal file
View File

@ -0,0 +1,16 @@
import io
const keyboardAddress = 0x60
type
KeypressEvent = tuple
character: char
pressed: bool
proc getScancode(): char =
while true:
let c = io.inb(keyboardAddress)
if(c > 0): return c
proc getChar*(): char =
discard # TODO: Implement lookup to a scan table to get actual character