adb - Apple Desktop Bus event interface
adb0 at obio?
#option MRG_ADB (use ROM-based ADB driver)
#include <machine/adbsys.h>
The Apple Desktop Bus (ADB) is the single-master, multipleslave, lowspeed
serial bus interface used by Macintosh computers to
connect input
devices such as keyboards, mice, trackballs, and graphics
tablets to the
machine.
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
Macintosh mice
have only one button, the adb driver will emulate a second
and third
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
method interfaces
directly with the VIA hardware and with the Power
Manager hardware
if it is present (e.g. on the PowerBooks). The default
configuration
currently uses the Macintosh ROM Glue (MRG) method.
The ioctl(2) call is used to control the ADB event device.
The following
is a list of available ioctl(2) commands:
ADBIOC_DEVSINFO Get ADB Device Info
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 Get Keyboard Repeat Info
Returns a structure containing the current
keyboard repeat
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
reinitialize all
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
time.
The adb device supports the ADB hardware of most m68k-based
Macintosh
models, including the II-series, Centris- and Quadra-series,
PowerBookand
Duo-series, LC-series, and Performa-series models.
Most standard ADB devices are supported by the adb driver,
including mice
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
ADB devices:
Apple Standard Keyboard
Apple Extended Keyboard
Apple Adjustable Keyboard
Apple Desktop Bus Mouse
Logitech TrackMan
Logitech MouseMan
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
indicating the
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
kernel lacks
the necessary Macintosh ROM Glue (MRG) support for accessing
the ADB
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.
intro(4)
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.
Wittkowski.
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
exotic devices
will not work.
OpenBSD 3.6 July 17, 1997
[ Back ] |