Subject: keyboard interface observations
To: None <port-next68k@NetBSD.ORG>
From: Darrin Jewell <dbj@NetBSD.ORG>
List: port-next68k
Date: 07/04/1998 19:17:31
I was recently asked about the keyboard hardware interface,
so try to give a starting roadmap to figuring some of it out.

Most of this is glommed from the nextstep 2.x header files.

I don't know which keyboads (adb vs. non-adb) this applies
to.  Hopefully both.

Use the NEXT_I_KBD_MOUSE interrupt defined in the NetBSD cpu.h
to get keyboard interrupts.

In the interrupt, you want to muck with the device register
accessed via the NEXT_P_MON defined in the NetBSD cpu.h
This is at hardware address 0x0200e000.

The nextstep 2.x nextdev/monreg.h include files looks
like they describe the bits in the register at that
address.  the mon_km_data field of the "struct monitor"
(4 bytes at NEXT_P_MON + 8) looks like it is
formated as "struct keyboard" in nextdev/kmreg.h.

The keyboard support looks a little intertwined with the ROM
monitor.  Hopefully it still works when the ROM isn't mapped
as expected.  I've been debating mapping the ROM's into their
usual place and seeing if we can take advantage of the provided
routines.

Also, whoever writes the keyboard driver should also consider
the laser printer driver.  The nextstep 2.x nextdev/npreg.h
header file makes the printer interface look very similar.

Darrin