Microsoft Windows CE 3.0  

System Architecture for Native Device Drivers

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The sample device drivers included with the Windows CE Platform Builder come in two forms: monolithicand layered. Source code for a monolithic driver consists of both interrupt service thread code and platform specific code. In contrast, layered device drivers split the code into an upper layer called the Model Device Driver (MDD) and a lower layer called the Platform Dependent Driver (PDD). The MDD layer contains code that is common to all drivers of a given type. The PDD layer consists of the code that is specific to a given hardware device or platform. The MDD calls specific PDD routines to access the hardware or hardware specific information. When using a layered driver, the OEM reuses the common MDD code provided by Microsoft in the Windows CE Platform Builder, and only writes new PDD code that is specific to the OEM's hardware. Or, if porting one of Microsoft's sample drivers to new hardware, the OEM only needs to port the PDD layer; the MDD layer can be used as-is.

The layered driver style is not required and may not be appropriate for all drivers. In particular, splitting device driver code into two layers imposes additional function call overhead in the device driver's operation. For performance critical situations, a monolithic driver may be more appropriate.

The following illustration shows the integration of monolithic and layered drivers within the Windows CE operating system.

Microsoft provides the MDD for a layered driver. The MDD is common to all platforms and functions, both as source code and as a library. It performs the following tasks: