GIO_submit
2-134
The appCallback parameter points to either a callback structure that
contains the callback function to be called when the request completes,
or it points to NULL, which causes the call to be synchronous. When a
queued request is completed, the callback routine (if specified) is invoked
(i.e. blocking).
GIO_submit returns IOM_COMPLETED upon successfully carrying out
the requested functionality. If the request is queued, then a status of
IOM_PENDING is returned. If an error occurs, the device returns a
negative value. For a list of error values, see “Constants, Types, and
Structures” on page 2-118.
A call to GIO_submit results in a call to the mdSubmit function of the
associated mini-driver. The specified command is passed to the
mdSubmit function.
Constraints and
Calling Context
❏
This function can be called only after the device has been loaded and
initialized. The handle supplied should have been obtained with a
prior call to GIO_create or GIO_new.
❏
This function can be called within the program’s main() function only
if the GIO channel is asynchronous (non-blocking).
Example
/* write asynchronously to the device*/
size = sizeof(userStruct);
status = GIO_submit(gioChan, IOM_WRITE, &userStruct,
&size, &callbackStruct);
/* write synchronously to the device */
size = sizeof(userStruct);
status = GIO_submit(gioChan, IOM_WRITE, &userStruct,
&size, NULL);