Overview of Streaming I/O and Device Drivers
Streaming I/O and Device Drivers 7-3
Unlike other modules, your application programs do not issue direct calls to
driver functions that manipulate individual device objects managed by the
SIO module. Instead, each driver module exports a specifically named
structure of a specific type (DEV_Fxns), which in turn is used by the SIO
module to route generic function calls to the proper driver function.
As illustrated in Table 7-1, each SIO operation calls the appropriate driver
function by referencing this table. Dxx designates the device-specific function
which you write for your particular device.
Table 7-1. Generic I/O to Internal Driver Operations
These internal driver functions can rely on virtually all of the capabilities
supplied by DSP/BIOS, ranging from the multitasking features of the kernel
to the application-level services. Drivers use the device-independent I/O
interface of DSP/BIOS to communicate indirectly with other drivers,
especially in supporting stackable devices.
Generic I/O Operation Internal Driver Operation
SIO_create(name, mode, bufsize, attrs) Dxx_open(device, name)
SIO_delete(stream) Dxx_close(device)
SIO_get(stream, &buf)
Dxx_issue(device) and
Dxx_reclaim(device)
SIO_put(stream, &buf, nbytes)
Dxx_issue(device) and
Dxx_reclaim(device)
SIO_ctrl(stream, cmd, arg) Dxx_ctrl(device, cmd, arg)
SIO_idle(stream) Dxx_idle(device, FALSE)
SIO_flush(stream) Dxx_idle(device, TRUE)
SIO_select(streamtab, n, timeout) Dxx_ready(device, sem)
SIO_issue(stream, buf, nbytes, arg) Dxx_issue(device)
SIO_reclaim(stream, &buf, &arg) Dxx_reclaim(device)
SIO_staticbuf(stream, &buf) none