|
Getting Started with Hardware & DriversTechnology OverviewApple's adoption of open standards and support for standard peripheral families yields opportunities for both hardware and device-driver developers. Hardware developers can take advantage of standard high-performance interfaces to develop add-on or peripheral products that extend the capabilities of the Macintosh. Driver developers can use the I/O Kit, Apple's object-oriented driver-development framework, to create in-kernel or application-level drivers for their own or another vendor's devices. In addition, Mac OS X provides several services that allow applications to communicate with hardware from plug-ins, shared libraries, and other code running outside the kernel. Start HereBefore you begin developing an add-on or peripheral device, you might want to familiarize yourself with the Apple hardware product lines and the I/O technologies they support. Start with Apple's Hardware and Support websites to get an overview of Apple products, technology specifications, service, and training. Apple’s Hardware & Drivers website provides links to helpful hardware and driver topics, references, and downloads. Before you begin developing code that accesses or communicates with hardware, read:
Choose a Learning PathIf you're a hardware developer, you want to understand Apple’s implementation of hardware interfaces, protocols, and standards to ensure compatibility and peak performance of your devices. Printer vendors and designers of consumer devices want to ensure compatibility with system software and applications. If you're a software developer, you should first find out if you can use high-level APIs to access your device and avoid writing a device driver. If you do need to develop a device driver, you want to know whether your driver must be in the kernel or can be in an application. If you're a UNIX developer, you may want to know how to port your driver to Mac OS X. Developing, Supporting, and Servicing HardwareApple provides documentation and resources to help you learn more about the system and identify opportunities for hardware development and support.
Using High-Level APIs to Access HardwareMany applications can handle all their hardware-access needs using high-level APIs that are available through Carbon and Cocoa. Unless you’re absolutely certain you need to develop a device driver, read the following to find out if there is an easier solution:
Determining Where Your Device Driver Needs to ResideYou know what type of device you need to communicate with, but you’re not sure which access strategy is best. Read the following to help you decide how to proceed:
Developing a Device Driver in an ApplicationYou’ve determined that you can develop an application that communicates with or controls your device. The I/O Kit supports application-level device access with a mechanism called a device interface.
Developing a Device Driver in the KernelDeveloping a kernel-resident device driver is difficult at best and should be done only if there is no alternative. If you’ve determined that your device driver must reside in the kernel, you want to learn more about the kernel and how to program in it.
Porting a Device Driver from UNIXIf you’ve written a device driver for a UNIX environment and you want to learn how to port it to Mac OS X, read Porting UNIX/Linux Applications to Mac OS X for an overview of Mac OS X targeted at the UNIX developer. As a device-driver developer, you should read the Porting File and Device I/O chapter in particular. Next StepsThe Hardware & Drivers Reference Library includes the following high-level resource pages of interest to hardware and device-driver developers. These pages can be bookmarked for easy access.
|
© 2004, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-05-06)
|