7-1
Chapter 7
Streaming I/O and Device Drivers
This chapter describes issues relating to writing and using device drivers that
use the DEV_Fxns model, and gives several programming examples.
7.1 Overview of Streaming I/O and Device Drivers . . . . . . . . . . . . . . . . .7-2
7.2 Creating and Deleting Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-5
7.3 Stream I/O—Reading and Writing Streams. . . . . . . . . . . . . . . . . . . . .7-7
7.4 Stackable Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-16
7.5 Controlling Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-22
7.6 Selecting Among Multiple Streams . . . . . . . . . . . . . . . . . . . . . . . . . .7-23
7.7 Streaming Data to Multiple Clients . . . . . . . . . . . . . . . . . . . . . . . . . .7-25
7.8 Streaming Data Between Target and Host . . . . . . . . . . . . . . . . . . . .7-27
7.9 Device Driver Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-28
7.10 Streaming DEV Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-30
7.11 Device Driver Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-33
7.12 Opening Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-34
7.13 Real-Time I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-38
7.14 Closing Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-41
7.15 Device Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-43
7.16 Device Ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-43
7.17 Types of Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-46
Topic Page