Developing a Device Driver (Windows CE 5.0)
A device driver is software that abstracts the functionality of a physical or virtual device. A device driver manages the operation of these devices. Examples of physical devices are network adapters, timers, and universal asynchronous receiver-transmitters (UARTs). An example of a virtual device is a file system. Implementing a device driver allows the functionality of your device to be exposed to applications and other parts of the operating system (OS). While developing a device driver, take advantage of the services provided by the OS. Although Windows CE device drivers are trusted modules, they do not have to run in kernel mode.
Important
This topic applies to an older product version. See documentation for the most current version of Windows Embedded Compact. Or visit Windows Embedded Products & Solutions for the latest information about intelligent systems powered by Microsoft.
Many Windows CE device drivers implement the stream interface. The core stream interface entry points are XXX_Open (Device Manager), XXX_Close (Device Manager), XXX_Read (Device Manager), and XXX_Write (Device Manager). For more information, see Stream Interface Drivers.
Network adapters, display adapters, mouse devices, keyboards, and other special-purpose devices do not use the stream interface. These devices use an interface that suits the device's functionality.
Regardless of the interface that your device driver exposes, you might have to implement an interrupt service routine (ISR). For more information about interrupts and ISRs, see Interrupts.
Different processes load different drivers. The following table shows the processes that load drivers and what drivers each process loads.
Process | Drivers |
---|---|
File System (FileSys.exe) | FileSys.exe loads file system drivers. For more information, see File Systems. |
Device Manager (Device.exe) | Device.exe loads audio drivers, battery drivers, keyboard drivers, mouse drivers, NDIS drivers, notification LED drivers, serial drivers, PC Card drivers, USB drivers, and any other driver that exposes the stream interface. Device.exe loads most of its drivers with ActivateDeviceEx, and these drivers expose a stream interface. For more information, see Device Manager. |
Graphics, Windowing, and Events Subsystem (GWES.exe) | GWES.exe loads a device driver if GWES is the only client of a driver. Device drivers loaded by GWES present a standard set of functionality for all similar devices. Drivers that GWES loads might expose the stream interface or they might expose other interfaces. Having alternatives make accessing the drivers much faster. GWES loads display drivers, printer drivers, and touch screen drivers. For more information, see Shell and User Interface Overview. |
In This Section
- Device Driver Development Overview
Provides links to topics describing the source code for device drivers, the tools provided for device driver development, and where to obtain and certify third-party device drivers and board support packages. - Device Driver Development Concepts
Provides conceptual information on developing device drivers for Windows CE. - Device Driver Development Helper Libraries
Explains the helper libraries that Windows CE provides to facilitate device driver development. - Device Driver Development How-to Topics
Provides links to all Windows CE driver development how-to documentation. - Best Practices for Developing a Device Driver
Describes best practices for developing secure, reliable, power manageable, portable, and maintainable device drivers. Provides information about the production-quality device drivers that Windows CE provides. - Device Manager
Describes Device Manager, device file names, and the I/O Resource Manager. - Power Management
Describes the power management capabilities provided by the Windows CE operating system. - Windows CE Drivers
Provides links to all the categories of drivers included with Windows CE.
Related Sections
- Bringing Up a Hardware Platform
Describes how to use board support packages (BSPs) to bring up a hardware platform. - Catalog Item Management
Explains how to manipulate device drivers and other Catalog items in the Platform Builder IDE. - Debugging and Testing
Provides information on debugging and testing. - Device Driver Libraries
Explains the source code for device drivers and where the source code is located. - Message Queue Point-to-Point Reference
Describes the message queue point-to-point reference. - Migrating a Board Support Package
Explains how to migrate a BSP from a previous version of Windows CE. - Migrating from an Earlier Version of Windows CE
Provides links to information about migrating an OS design from earlier versions of Windows CE.
Send Feedback on this topic to the authors