Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 5 - ADB Manager / ADB Manager Reference
ADB Manager Routines / Initializing the ADB Manager


ADBReInit

The Macintosh Operating System uses the ADBReInit procedure to reinitialize the Apple Desktop Bus.

PROCEDURE ADBReInit;
DESCRIPTION
The ADBReInit procedure reinitializes the Apple Desktop Bus to its original condition at system startup time. It clears the ADB device table and places a SendReset command on the bus to reset all devices to their original addresses. The ADB Manager resolves any address conflicts and rebuilds the device table.

IMPORTANT
In general, your application shouldn't call ADBReInit. If you need to assign a different device handler to a device, or activate a "virtual" device associated with some device that is already connected to the bus, you can use the SetADBInfo routine.
The ADBReInit procedure also calls the routine pointed to by the system global variable JADBProc at the beginning and end of its execution. You can insert your own preprocessing and postprocessing routine by changing the value of JADBProc. When this routine is called, D0 contains the value 0 for preprocessing and 1 for postprocessing. Your routine must restore the value of D0 and branch to the original value of JADBProc on exit. Because the ADB is reinitialized during postprocessing, the ADB Manager might need to perform address resolution. As a result, you cannot assume that your ADB device still resides at its default address after postprocessing occurs.

SPECIAL CONSIDERATIONS
Calling ADBReInit on computers running system software versions earlier than 6.0.4 can cause incorrect keyboard layouts to be loaded.

The ADBReInit procedure does not deallocate memory that has been allocated by the device handler installation code.

If you provide a device handler that is installed by a system extension, you must reinstall the entry for your ADB device in the ADB device table. See "Installing an ADB Device Handler," beginning on page 5-30 for more information.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996