GIO Module
2-118
2.7
GIO Module
The GIO module is the Input/Output Module used with IOM mini-drivers
as described in
DSP/BIOS Device Driver Developer's Guide
(SPRU616).
Functions
❏
GIO_abort. Abort all pending input and output.
❏
GIO_control. Device specific control call.
❏
GIO_create. Allocate and initialize a GIO object.
❏
GIO_delete. Delete underlying mini-drivers and free up the GIO
object and any associated IOM packet structures.
❏
GIO_flush. Drain output buffers and discard any pending input.
❏
GIO_new. Initialize a GIO object using pre-allocated memory.
❏
GIO_read. Synchronous read command.
❏
GIO_submit. Submits a packet to the mini-driver.
❏
GIO_write. Synchronous write command.
Constants, Types,
and Structures
/* Modes for GIO_create */
#define IOM_INPUT 0x0001
#define IOM_OUTPUT 0x0002
#define IOM_INOUT (IOM_INPUT | IOM_OUTPUT)
/* IOM Status and Error Codes */
#define IOM_COMPLETED SYS_OK /* I/O successful */
#define IOM_PENDING 1 /* I/O queued and pending */
#define IOM_FLUSHED 2 /* I/O request flushed */
#define IOM_ABORTED 3 /* I/O aborted */
#define IOM_EBADIO -1 /* generic failure */
#define IOM_ETIMEOUT -2 /* timeout occurred */
#define IOM_ENOPACKETS -3 /* no packets available */
#define IOM_EFREE -4 /* unable to free resources */
#define IOM_EALLOC -5 /* unable to alloc resource */
#define IOM_EABORT -6 /* I/O aborted uncompleted*/
#define IOM_EBADMODE -7 /* illegal device mode */
#define IOM_EOF -8 /* end-of-file encountered */
#define IOM_ENOTIMPL -9 /* operation not supported */
#define IOM_EBADARGS -10 /* illegal arguments used */
#define IOM_ETIMEOUTUNREC -11
/* unrecoverable timeout occurred */
#define IOM_EINUSE -12 /* device already in use */