Introduction to USB Device Interface Guide

The I/O Kit provides a device interface mechanism that allows applications to communicate with and control hardware from outside the kernel. This document focuses on how to use that mechanism to create an application that detects the attachment of a USB device, communicates with it, and detects its detachment.

This document does not describe how to develop an in-kernel driver for a USB modem or networking device. If you need to do this, refer to the documentation and sample code listed in See Also.

Organization of This Document

This document contains the following chapters:

See Also

The ADC Reference Library contains several documents on device driver development for OS X and numerous sample drivers and applications.

If you need to develop an in-kernel driver for a USB modem or networking device, refer to the following:

If you're ready to create a universal binary version of your USB device-access application to run in an Intel-based Macintosh, see Universal Binary Programming Guidelines, Second Edition. The Universal Binary Programming Guidelines describes the differences between the Intel and PowerPC architectures and provides tips for developing a universal binary.

If you are working with a device that complies with the USB mass storage specification but declares its device class to be vendor specific, see Mass Storage Device Driver Programming Guide for information on how to ensure the correct built-in driver loads for the device.

Apple provides additional USB information (including the OS X USB Debug Kits) at http://developer.apple.com/hardwaredrivers/usb/index.html.

A detailed description of the USB device specification is beyond the scope of this document—for more information, see Universal Serial Bus Specification Revision 2.0 available at http://www.usb.org.