commit 7a600617da64d1cbd324239190519fa1b12017db
parent daed8634edd3524436341be12904d564b8971e19
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Sun, 6 Nov 2022 10:43:12 -0500
drv/pc/ps28042p: bring back the polling PS/2 driver
.. as a separate option. The interrupt-driven driver is generally preferable,
but when debugging machines, we sometimes want to avoid playing with interrupt
vectors too much and get to a prompt as fast as possible. The polling PS/2
driver can help in those situations.
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/fs/drv/pc/ps28042p.fs b/fs/drv/pc/ps28042p.fs
@@ -0,0 +1,8 @@
+\ 8042 PS/2 Controller driver, polling version
+\ You will generally want to use the interrupt-based version of this driver,
+\ but sometimes, when debugging hardware, you'll prefer to keep interrupts out.
+$60 const PS2DATA
+$64 const PS2CMD
+
+: 8042ps2@? ( -- keycode? f )
+ PS2CMD pc@ 1 and dup if PS2DATA pc@ swap then ;