Streaming DEV Structures
7-30
7.10 Streaming DEV Structures
The DEV_Fxns structure contains pointers to internal driver functions
corresponding to generic I/O operations as shown in Example 7-19.
Example 7-19.
The DEV_Fxns Structure
Device frames are structures of type DEV_Frame used by SIO and device
drivers to enqueue/dequeue stream buffers. The device
→
todevice and
device
→
fromdevice queues contain elements of this type (Example 7-20).
Example 7-20.
The DEV_Frame Structure
Example 7-20 has the following parameters:
❏
link
is used by QUE_put and QUE_get to enqueue/dequeue the frame.
❏
addr
contains the address of the stream buffer.
❏
size
contains the logical size of the stream buffer. The logical size can be
less than the physical buffer size.
❏
misc
is an extra field which is reserved for use by a device.
❏
arg
is an extra field available for you to associate information with a
particular frame of data. This field should be preserved by the device.
❏
cmd
is a command code for use with mini-drivers that use the IOM model
described in the
DSP/BIOS Driver Developer's Guide
(SPRU616). The
command code tells the mini-driver what action to perform.
❏
status
is a field set by an IOM mini-driver before calling a callback
function.
typedef struct DEV_Fxns {
Int (*close)(DEV_Handle);
Int (*ctrl)(DEV_Handle, Uns, Arg);
Int (*idle)(DEV_Handle, Bool);
Int (*issue(DEV_Handle);
Int (*open)(DEV_Handle, String);
Bool (*ready)(DEV_Handle, SEM_Handle);
Int (*reclaim)(DEV_Handle);
} DEV_Fxns;
typedef struct DEV_Frame { /* frame object */
QUE_Elem link; /* queue link */
Ptr addr; /* buffer address */
Uns size; /* buffer size */
Arg misc; /* reserved for driver */
Arg arg; /* user argument */
Uns cmd; /* mini-driver command */
Int status; /* status of command */
} DEV_Frame;
Summary of Contents for TMS320 Series
Page 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Page 16: ...xvi ...
Page 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Page 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Page 202: ...5 20 ...
Page 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Page 288: ...Index 10 Index ...