Compartir a través de


Native Drivers (Compact 2013)

3/26/2014

Native drivers are drivers that expose any API set other than the stream interface functions. Unlike stream drivers, each native driver implements a specific function according to its purpose. Because a native driver’s functions are specific to the functionality of the hardware and the way that functionality is used by subsystems such as GWES, there is no common set of interface functions for native drivers to expose, as in the case of stream drivers. Apart from this difference, native drivers behave exactly like stream drivers. They can be structured in a monolithic or layered design (see Layered and Monolithic Drivers), they can manage devices that are peripheral or built-in to the platform, and they can be loaded either when the system boots or on demand, such as when the user connects a device to the platform.

When to Create a Native Driver

Consider using a native driver design for a new device driver implementation if any of the following are true:

  • Your device is a display device or user input device.
  • Your device is controlled by GWES.
  • You have special device access requirements that do not fit into the stream interface model.
  • You are beginning your device driver development with an existing Windows Embedded Compact 2013 sample driver that is a native driver.

Sample Native Drivers

Microsoft has pre-designed the APIs exposed by device drivers that interact with certain portions of the Windows Embedded Compact operating system, such as GWES. Because we provide sample code for these drivers, you typically only need to port the appropriate sample driver to your specific hardware, and do not need to define the API set that your driver will expose. The provided native sample drivers include:

  • Sample Display Driver
  • Sample Keyboard Driver

The source code for each of these sample drivers is located at:

%_WINCEROOT%\Public\Common\Oak\Drivers

These sample native device drivers present a standard set of functionality for all devices of a particular class, and all representatives of a specific class conform to the same interface. The Windows Embedded Compact operating system can then treat all instances of a particular device class in a similar way. For example, the OS uses both UHCI- and OHCI-compliant USB controller hardware in the same way, because the USB host controller driver hides the differences between these hardware implementations from the operating system, even though those two types of USB controller hardware are internally very different.

For More Information About Native Drivers

Native drivers are typically used for graphics adapters and user interface hardware. To learn more about these types of drivers, see the Windows Embedded Compact topics described in the following table.

Topic

Description

Display Drivers

Describes the native device driver interface between GWES and display drivers.

Touch Drivers

Describes the interface for devices that users can touch with either a stylus or their fingers to provide user input.

Keyboard and Mouse Drivers

Describes the interface for Windows Embedded Compact keyboard drivers, which also encapsulate mouse driver functionality.

See Also

Concepts

Stream Drivers and Native Drivers