INTRODUCING DEVICE DRIVER ARCHITECTURES

Device drivers provide the interface between device hardware and the operating system. They can be structured in a number of ways. This section provides an introductory look at the different architectures you can use with device drivers.

What Is a Hardware Device Driver?

A hardware device driver is a software component that abstracts the underlying functionality of a physical device into the OS, as shown in Figure 30-1. That is, it makes the device functionality available to the OS and software entities that run on that system via a top-level interface. The device just plugs into the OS via the device driver. Applications therefore do not need to recode all the low-level hardware access code because that is all encapsulated in the device driver.

As shown in Figure 30-2, at the top level of the driver architecture is an interface that plugs the driver into the OS. At the bottom is an interface to the underlying hardware in terms of ports, registers, memory, and interrupts. In between these two interfaces, the device driver implements buffers for moving data between the interfaces, interrupts handlers to handle hardware generated events, and threads to respond to these events in a coherent manner. The device driver can also handle software and hardware configuration parameters submitted to it by the OS as well as status and data ...

Get Professional Windows® Embedded Compact 7 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.