DEV_createDevice
Application Program Interface
2-65
The attrs parameter points to a structure of type DEV_Attrs. This
structure is used to pass additional device attributes to
DEV_createDevice. If attrs is NULL, the device is created with default
attributes. DEV_Attrs has the following structure:
typedef struct DEV_Attrs {
#if (defined(_54_) && defined(_FAR_MODE)) || defined(_55_)
LgInt devid; /* device id */
#else
Int devid; /* device id */
#endif
Ptr params; /* device parameters */
Uns type; /* type of the device */
Ptr devp; /* device global data ptr */
} DEV_Attrs;
The devid item specifies the device ID. If the value you provide is non-
zero, the value takes the place of a value that would be appended to the
device name in a call to SIO_create. The purpose of such a value is
driver-specific. The default value is NULL.
The params item specifies the name of a parameter structure that may
be used to provide additional parameters. This structure should have a
name with the format DXX_Params where XX is the two-letter code for
the driver used by this device. The default value is NULL.
The type item specifies the type of driver used with this device. The
default value is DEV_IOMTYPE. The options are:
The devp item specifies the device global data pointer, which points to
any global data to be used by this device. This value can be set only if the
table type is IOM_Fxns.The default value is NULL.
If an initFxn is specified, that function is called as a result of calling
DEV_createDevice. In addition, if the device type is DEV_IOMTYPE, the
mdBindDev function in the function table pointed to by the fxns parameter
is called as a result of calling DEV_createDevice. Both of these calls are
made with interrupts disabled.
Type
Use With
DEV_IOMTYPE
Mini-drivers used in the IOM model
.
DEV_SIOTYPE
DIO adapter with SIO streams or
other DEV/SIO drivers