Overview of Streaming I/O and Device Drivers
7-4
Figure 7-2 illustrates the relationship between the device, the Dxx device
driver, and the stream accepting data from the device. SIO calls the Dxx
functions listed in DEV_Fxns, the function table for the device. Both input and
output streams exchange buffers with the device using the atomic queues
device
→todevice and device→fromdevice.
Figure 7-2. Device, Driver, and Stream Relationship
For every device driver you need to write Dxx_open, Dxx_idle, Dxx_input,
Dxx_output, Dxx_close, Dxx_ctrl, Dxx_ready, Dxx_issue, and Dxx_reclaim.
SIO_create()
SIO_ctrl()
SIO_get()
SIO_put()
todevice fromdevice
SIO
Device Driver
Stream
Device
open
ctrl
issue
reclaim
.
.
.
DEV_Fxns
Dxx_open()
Dxx_ctrl()
Dxx_issue()
Dxx_reclaim()
DEV_FXNS
DEV_Frame
.
.
.
.
.
.