Compartilhar via


Serial Port Driver Development Concepts (Windows CE 5.0)

Send Feedback

In Microsoft® Windows® CE, you can use two different methods to create drivers for serial devices. You can create a stream interface driver dynamic-link library (DLL) that presents high-level information from the device to user applications, or you can have the applications that use the serial device interpret the device data directly. These two methods are possible because users always access serial devices through built-in communications (COM) ports, generally COM1: through COM3:.

With the first method, you implement a serial device driver to present a new device file name to applications, such as COM4:, or another file name specific to the function of the serial device. A device driver uses the services of the built-in COM port to access the peripheral device. With the second method, you enable user applications to open a built-in COM port to access the peripheral device directly.

The following table shows issues to consider when deciding between these two driver development methods.

Issue Strategy
Single access or multiple access If the peripheral can support simultaneous access by multiple applications, implement a stream interface driver. This greatly simplifies the user-level applications.
Complexity of the incoming data stream If the incoming data stream from the peripheral is complicated and requires considerable processing to yield usable information, write a stream interface driver.
Speed of the incoming data stream If data comes from the peripheral at a very high rate, use an installable interrupt service routine (ISR) for a serial driver that captures data at a high rate. A high rate of data might not allow enough processing time to support the overhead that is required for a stream interface driver.

See Also

Serial Port Driver Architecture | Power Management in Serial Port Drivers | Automatic Detection of Docking for Serial Ports | High Speed Serial Port Driver

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.