DEV_createDevice
2-64
Important Note:
This API will no longer be supported in the next major
release of DSP/BIOS. We recommend that you use the IOM driver
interface instead. See the
DSP/BIOS Driver Developer’s Guide
(SPRU616). This API is still supported in DSP/BIOS 5.32 and will be
supported in any patch releases or minor enhancements to DSP/BIOS
5.32.
C Interface
Syntax
status = DEV_createDevice(name, fxns, initFxn, attrs);
Parameters
String
name;
/* name of device to be created */
Void
*fxns;
/* pointer to device function table */
Fxn
initFxn;
/* device init function */
DEV_Attrs
*attrs;
/* pointer to device attributes */
Return Value
Int
status;
/* result of operation */
Reentrant
no
Description
DEV_createDevice allows an application to create a user-defined device
object at run-time. The object created has parameters similar to those
defined statically for the DEV Object Properties. After being created, the
device can be used as with statically-created DEV objects.
The name parameter specifies the name of the device. The device name
should begin with a slash (/) for consistency with statically-created
devices and to permit stacking drivers. For example "/codec" might be the
name. The name must be unique within the application. If the specified
device name already exists, this function returns failure.
The fxns parameter points to the device function table. The function table
may be of type DEV_Fxns or IOM_Fxns.
The initFxn parameter specifies a device initialization function. The
function passed as this parameter is run if the device is created
successfully. The initialization function is called with interrupts disabled.
If several devices may use the same driver, the initialization function (or
a function wrapper) should ensure that one-time initialization actions are
performed only once.
DEV_createDevice
Dynamically create device