GIO_create
2-126
GIO_create returns a handle to the GIO_Obj object created upon a
successful open. The handle returned by this call should be used by the
application in subsequent calls to GIO functions. This function returns a
NULL handle if the device could not be opened. For example, if a device
is opened in a mode not supported by the device, this call returns a NULL
handle.
A call to GIO_create results in a call to the mdCreateChan function of the
associated mini-driver.
Constraints and
Calling Context
❏
A GIO stream can only be used by one task simultaneously.
Catastrophic failure can result if more than one task calls GIO_read
on the same input stream, or more than one task calls GIO_write on
the same output stream.
❏
GIO_create cannot be called from the context of a SWI or HWI
thread.
❏
This function can be called only after the device has been loaded and
initialized.
Example
/* Create a device instance */
gioAttrs = GIO_ATTRS;
gioChan = GIO_create("\Codec0", IOM_INPUT, NULL, NULL,
&gioAttrs);