PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

DoDriverIO Entry Point

Generic 'ndrv' drivers must provide a single code entry point DoDriverIO, which responds to kOpenCommand, kCloseCommand, kReadCommand, kWriteCommand, kControlCommand, kStatusCommand, kKillIOCommand, kInitializeCommand, kFinalizeCommand, kReplaceCommand, and kSupersededCommand commands.

OSErr DoDriverIO (
                     AddressSpaceID spaceID,
                     IOCommandID ID,
                     IOCommandContents contents,
                     IOCommandCode code,
                     IOCommandKind kind);

typedef KernelID AddressSpaceID;
spaceID
The address space containing the buffer to be prepared. Mac OS 7.5 and later provide only one address space ( kCurrentAddressSpaceID ), which it automatically passes to native drivers.
ID
Command ID.
contents
An IOCommandContents I/O parameter block. Use the InitializationInfo union member when calling to initialize the driver, FinalizationInfo when removing the driver, DriverReplaceInfo when replacing, DriverSupersededInfo when superseding, and ParmBlkPtr for all other I/O actions.
code
Selector used to determine I/O actions.
kind
Options used to determine how I/O actions are performed. The bits in this field have these meanings:

Bit

Meaning

0 synchronous I/O
1 asynchronous I/O
2 immediate I/O

DoDriverIO Parameter Data Structures

Sample Handler Framework


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)