O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

STREAM DRIVERS

A majority of Windows Embedded Compact 7 drivers are implemented as Stream Drivers. Any device that can be modeled as producing and consuming data in a stream can have a device driver implemented as a Stream Driver. Drivers as diverse as serial, battery, backlight, NLED, accelerometer, and I2C are all implemented as Stream Drivers. For layered Stream Drivers, the MDD, the part that interfaces to the OS, implements the stream interface. Even the RELFSD driver, which enables the mounting of the Release Directory File System on a development system, has a pseudo Stream Driver interface so that Device Manager can load it.

Why Stream Drivers?

Stream Drivers, unlike native drivers, all interlock with the operating system in a standard manner but have the flexibility via IOCTLs to implement specific functionality. This standardization results in a generic functional interface between the drivers and their operating system manager, Device Manager. Driver source code consists of a set of functions that all Stream Drivers implement in part or in full. The same API is used to load, unload, and perform data streaming with the driver. Yet IOCLs provide a “backdoor” interface for implementing driver-specific functionality and for low-level operating system functions such as power management.

Stream Driver Architecture

Figure 32-1 shows the Stream Driver architecture. An application makes calls to the Device Manager to load a Stream Driver. The system or an application can similarly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required