adb - Apple Desktop Bus event interface
adb0 at obio?
#option MRG_ADB (use ROM-based ADB driver)
The Apple Desktop Bus (ADB) is the single-master, multipleslave, lowspeed
serial bus interface used by Macintosh computers to
devices such as keyboards, mice, trackballs, and graphics
tablets to the
The adb device is the sole interface to user input. It combines both
keyboard and mouse drivers into one event driver. All user
input is obtained
by doing a read(2) on the adb device. Since most
have only one button, the adb driver will emulate a second
mouse button with the keyboard. The adb device only supports being
opened by one process at a time.
There are two interfaces to the ADB hardware supported by
the adb driver.
The older of the two relies on information in the Macintosh
ROM to interface
with the hardware. This method is only available if
the MRG_ADB option
is defined in the kernel configuration file. The newer
directly with the VIA hardware and with the Power
if it is present (e.g. on the PowerBooks). The default
currently uses the Macintosh ROM Glue (MRG) method.
The ioctl(2) call is used to control the ADB event device.
is a list of available ioctl(2) commands:
ADBIOC_DEVSINFO Get ADB Device Info
The adb event device will return an array
containing an entry for each device
the bus. Each entry contains the current
address, and handler ID for the corresponding ADB
ADBIOC_GETREPEAT Get Keyboard Repeat Info
Returns a structure containing the current
delay and keyboard repeat interval.
ADBIOC_SETREPEAT Set Keyboard Repeat Rate
Sets the keyboard repeat delay and interval to the values
specified by argp.
ADBIOC_RESET ADB Reset
Perform a reset of the ADB which will
of the devices attached to the bus.
ADBIOC_LISTENCMD ADB Listen Command
Send data to the register of the ADB device specified
by argp. This command is not fully implemented at this
The adb device supports the ADB hardware of most m68k-based
models, including the II-series, Centris- and Quadra-series,
Duo-series, LC-series, and Performa-series models.
Most standard ADB devices are supported by the adb driver,
which follow Apple's Extended Mouse Protocol. Many multibutton mice
which follow a proprietary protocol are not currently supported in multibutton
mode. The following is a partial list of supported
Apple Standard Keyboard
Apple Extended Keyboard
Apple Adjustable Keyboard
Apple Desktop Bus Mouse
Microspeed Mouse Deluxe
Mouse Systems A3 Mouse
/dev/adb The ADB event device.
adb0 at obio0 (ADB event device). This is a normal autoconfiguration
message noting the presence of the adb event device.
adb: bus subsystem. A standard autoconfiguration message
initialization of the ADB subsystem.
adb: no devices found. No ADB devices were found to be connected to the
bus during autoconfiguration.
adb: using %s series hardware support. Indicates the class
of ADB hardware
support the machine uses.
adb: hardware type unknown for this machine. The ADB hardware in this
machine is currently unsupported.
adb: no ROM ADB driver in this kernel for this machine. The
the necessary Macintosh ROM Glue (MRG) support for accessing
hardware on this machine.
adb: using serial console. A serial console will be used
for user input
rather than the ADB event device.
adb: %s at %d. An ADB device of the type specified by %s
has been found
at location %d.
[ENXIO] No such ADB event device.
[EBUSY] Another process has the device open.
[EINVAL] Invalid ioctl(2) specification.
[EMSGSIZE] The size of the ADB event being read is too
large to fit
into the buffer allocated to it.
The adb interface first appeared in NetBSD 0.9.
Bradley A. Grantham wrote the original adb driver, including
the MRG support.
The hardware direct interface was written by John P.
The PowerManager interface was written by Takashi Hamada.
+o Not every class of ADB hardware is supported yet.
+o The talk command is currently unimplemented.
+o The listen command is not implemented yet.
+o Not all multi-button mice are currently supported.
+o Only mapped and relative-position ADB devices (i.e. keyboards and
mice) are supported. Thus absolute-position and other
will not work.
OpenBSD 3.6 July 17, 1997
[ Back ]