![]() |
---|
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. |
Windows CE supports two methods of driving serial devices. The first requires you to create a stream interface driver DLL that presents high-level information from the device to applications. The second does not require that you write a driver; instead, it requires the applications that use the device to interpret the device data.
These two methods are possible because serial devices are always accessed through built-in 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. Internally, a device driver uses the services of the built-in COM port to access the peripheral. You can also let user applications open a built-in COM port to access the peripheral device directly.
The following are the factors allowing you to decide between these two strategies:
If the peripheral can support simultaneous access by multiple applications, implement a stream interface driver. This greatly simplifies the user-level applications.
If the incoming data stream from the peripheral is complicated and requires considerable processing to yield usable information, you probably should write a stream interface driver.
If data comes from the peripheral at a very high rate, there
might not be enough processing time available to support the
overhead that is required for a stream interface driver. In this
case, you might have no choice but to put all processing into the
user-level application.
Last updated on Tuesday, July 13, 2004