This appendix lists the current I/O Kit device families, identifies which families support device interfaces and which can be accessed through device files and POSIX functions, and points to documentation for working with specific devices.
For more information on I/O Kit families, see I/O Kit Fundamentals. For reference documentation of I/O Kit family support of user-space device access, see the Device Drivers Reference Library.
Documentation for working with additional device families will be provided as it becomes available.
ADB family. This family provides an interface (defined in IOADBLib.h
) for reading and writing registers on ADB devices. The interface permits only polled mode operations. Interrupt operations are only supported for kernel-resident clients.
ATA and ATAPI family. This family does not supply any device interfaces. Access to ATA/ATAPI devices is provided by clients of this family, most commonly the Storage family.
The SCSI Architecture Model family provides device interfaces for ATAPI devices that comply with the SCSI Architecture Model SCSI Primary Commands specification. SeeSCSI Architecture Model Device Interface Guide for more information.
Audio family. The Audio family does not export device interfaces for applications to access audio hardware directly. However, it does provide a device interface that the Audio Hardware Abstraction Layer (Audio HAL) uses to access drivers derived from the Audio family.
FireWire family. The FireWire family provides a general-purpose device interface that is suitable for any FireWire device except those that require an in-kernel driver, such as disk drivers that mount file systems. However, the device interfaces provided by the FireWire DV and FireWire SBP-2 families (described next) provide mechanisms that may be more convenient for working with some devices.
For the latest information on Apple’s FireWire support, including access to development kits with device interface support, see http://developer.apple.com/hardwaredrivers/firewire/.
For more information about accessing FireWire devices (including AV/C and SBP-2 units) from an application, see FireWire Device Interface Guide.
FireWire DV family. The FireWire DV (digital video) family provides complete driver support so that you can use standard QuickTime functions to access DV devices such as cameras and camcorders. No specific knowledge of FireWire is required and you can use the same functions for Mac OS X and MacOS8and9. Additional documentation for DV support of lower-level device control may be provided at a later date.
FireWire SBP-2 family. This family provides a device interface to communicate with devices that support SBP-2 (Serial Bus Protocol 2).
The SCSI Architecture Model family provides device interfaces for FireWire SBP-2 devices that comply with the SCSI Architecture Model SCSI Primary Commands specification. SeeSCSI Architecture Model Device Interface Guide for more information.
Graphics family. The Graphics family includes Quartz 2D and other graphics libraries that provide high-level graphics-rendering services.
For information on Quartz 2D and Quartz Compositor (the Mac OS X window server), see “Hardware-Access Options.”
HID family. Through the HID Manager, the HID family provides a device interface for accessing a variety of devices, including joysticks and other game devices, audio devices, non-Apple displays, and UPS (uninterruptible power supply) devices. Note that you can use the Carbon Event Manager and NSEvent interfaces described in “Hardware-Access Options” to monitor mouse and keyboard actions.
For more information on using the HID Manager to access HID class devices, see HID Class Device Interface Guide. You can also find sample code for using the Mac OS X HID Manager in the Games Human Interface Device & Force Feedback Sample Code Library.
Network family. Mac OS X provides networking functions in Carbon and Cocoa that should handle most standard networking requirements for applications. You can also use the BSD sockets API to obtain network services. A recommended network programming book is Unix Network Programming, Volume 1, Second Edition, by W. Richard Stevens, Prentice-Hall PTR, 1998.
PC Card family. There are no direct device interfaces for either CardBus or 16-bit PC Card devices. Direct access to PC Card bus hardware by applications or other code running outside the kernel is not permitted for security reasons. Applications that must communicate with a PC Card must do so through an in-kernel driver.
PCI and AGP family. There are no device interfaces for PCI and AGP devices. Direct access to PCI bus hardware by applications or other code running outside the kernel is not permitted for security reasons. Applications that must communicate with a PCI or AGP card must do so through an in-kernel driver.
In most cases, applications should interact with higher-level services, such as those provided by the USB storage family or other client families. Applications can access graphics devices through the Quartz Compositor, which is described briefly in “Hardware-Access Options,” or other high-level APIs.
SCSI family. In versions of Mac OS X prior to 10.2, the SCSI family supported user-space access to parallel SCSI devices through the device-interface functions in the IOSCSILib.h
(in the cdb
directory of the I/O Kit framework). Your application may still be able to use these functions to find and communicate with parallel SCSI devices. However, if you’re looking up a parallel SCSI device that is not accessible with the SCSI Architecture Model family’s device interfaces and if your application requires compatibility with versions of Mac OS X prior to 10.2, you should employ the device look-up functions of both the new SCSI Parallel family and the old SCSI family. This is because after a user has installed new HBA (host bus adaptor) drivers developed with the new SCSI Parallel family, the device-interface functions of the SCSI family will no longer be supported. By using the functions of both families to look for the device, however, your application has the widest compatibility.
See SCSI Architecture Model Device Interface Guide for more information.
SCSI Architecture Model family. Devices that support the SCSI Architecture Model SCSI Primary Commands specification can be controlled by SCSI tasks, which are a means of executing command descriptor block (CDB) commands. The SCSI Architecture Model family provides device interfaces for accessing compliant ATAPI, USB mass storage, FireWire SBP-2, and, in some cases, parallel SCSI devices.
See SCSI Architecture Model Device Interface Guide for more information.
SCSI Parallel family. The SCSI Parallel family is new in Mac OS X version 10.2 and is designed to support SCSI controllers. If a user has installed new HBA (host bus adapter) drivers developed with the SCSI Parallel family, your application can access all SCSI devices that do not declare a peripheral device type of $00, $05, $07, or $0E using the device-interface functions of the SCSI Architecture Model family.
See SCSI Architecture Model Device Interface Guide for more information.
Serial family. Applications can access devices in this family through the device-file mechanism. You use the I/O Kit to obtain a path to the device files in the /dev
directory. The filenames start with cu
or tty
, such as cu.modem
, tty.modem
, ttyp1
, ttyp2
, and so on, so that a full device-file name would look like /dev/cu.modem
. You then perform traditional UNIX serial port access using POSIX termios
functions. Your application can read and write data using these device files. Data is also routed through to PPP via these device files. For related information, see “Inside the Device-File Mechanism.”
For information on how to use the device-file mechanism to access a serial device from an application, see Device File Access Guide for Serial Devices.
Storage family. Mac OS X provides file-management APIs in Carbon and Cocoa that allow applications to access files and folders on physical storage devices. Applications can also get raw access to media objects in this family through the device file system. You use the I/O Kit to obtain a path to device files in the /dev
directory, then use traditional UNIX file-system access through POSIX functions. For related information, see “Inside the Device-File Mechanism.”
For information on how to use the device-file mechanism to access storage media from an application, see Device File Access Guide for Storage Devices.
USB family. This family provides device interface support for generic Universal Serial Bus (USB) serial devices. Support for USB input devices is provided by the HID family. For more information on accessing USB devices from user space, see USB Device Interface Guide.
The SCSI Architecture Model family provides device interface support for USB mass storage class devices that comply with the SCSI Architecture Model SCSI Primary Commands specification. See SCSI Architecture Model Device Interface Guide for more information.
© 2001, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-08)