beautypg.com

5 - device drivers, Overview, Developing a device driver – Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 83: Chapter 5, Device drivers, Overview developing a device driver

background image

83

Publication 2711P-UM005A-EN-P - March 2007

Chapter

5

Device Drivers

Overview

This chapter provides an overview of developing a device driver and
sample code.

Developing a Device Driver

This discussion considers a device driver that implements the Win CE
standard stream driver interface. Ideally, the stream driver interface
should be the only interface used by applications, services, COM
servers, and other drivers to communicate with hardware.
Furthermore, a device driver is the only supported interface to the
hardware.

The following discussion and code samples provide preferred
methods for driver development. In an ever-changing CE OS
landscape, using these recommended methods should help maintain
compatibility with future platform releases.

It is recommended that the PCI or ISA bus enumerators be used to get
configuration data for PCI or ISA devices. These enumerators collect
configuration data from the device and deposit it in the registry. Using
helper functions from the Driver Development Kit (DDK) the
configuration information is easily obtained from the registry.
Additionally these enumerators also manage the IO and Resource
space, which helps protect your driver and hardware from access by
other modules.