ADB(4) | Device Drivers Manual | ADB(4) |
adb
—
adb* at obio?
options MRG_ADB
#include
<machine/adbsys.h>
The adb
driver accesses the ADB controller
using the so-called “HWDIRECT” method. This method of access
bypasses the Macintosh ROM and uses only NetBSD
routines for ADB access. This is the only method supported on macppc and is
the default for mac68k systems.
On mac68k systems there is an alternate method of accessing the ADB controller. With the Macintosh ROM Glue (MRG) method, the routines written for MacOS are used. To enable this method of ADB access, uncomment the line:
options MRG_ADB
in your kernel configuration file.
The ioctl(2) call is used to control the ADB event device. The following is a list of available ioctl(2) commands:
ADBIOC_DEVSINFO
The adb
event device will return an
array of information containing an entry for each device connected to
the bus. Each entry contains the current address, default address, and
handler ID for the corresponding ADB device.
ADBIOC_GETREPEAT
Returns a structure containing the current keyboard repeat delay and keyboard repeat interval.
ADBIOC_SETREPEAT
Sets the keyboard repeat delay and interval to the values specified by argp.
ADBIOC_RESET
Perform a reset of the ADB which will reinitialize all of the devices attached to the bus.
ADBIOC_LISTENCMD
Send data to the register of the ADB device specified by argp. This command is not fully implemented at this time.
adb
event device.adb
interface first appeared in
NetBSD 0.9. It has been under development ever since.
adb
driver, including the MRG support. The hardware
direct interface was written by John P. Wittkowski.
The PowerManager interface was written by Takashi
Hamada.
Some mac68k machines contain so-called dirty ROM. These machines are the: Mac SE/30, Mac II, Mac IIx, and Mac IIcx. Machines with dirty ROM may experience trouble booting if the MRG code is used, especially under the following conditions:
On (some) machines with dirty ROM, the ROM indicates the presence
of a “ghost” keyboard or mouse. When this nonexistent device
is probed for, the result is an infinite loop. This is believed to be
triggered by the adb
driver probing for extended
mice, and non-EMP Logitech mice.
August 31, 2018 | NetBSD 9.4 |