Texas Instruments TMS320 User Manual page 208

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

Comparing Driver Models
6.3.1
Creating a Device for Use with an IOM Mini-Driver
6.3.2
Creating a Device for Use with Streams and the DIO Adapter
6-6
The following sub-sections describe how to create user-defined devices
when using various I/O driver objects and models. For details on API function
calls and configuration parameters see the TMS320 DSP/BIOS API
Reference Guide for your platform.
If you plan to use an IOM mini-driver with the GIO class driver, create a user-
defined device statically or with a DEV_createDevice call similar to that
shown below:
DEV_Attrs gioAttrs = {
NULL,
NULL,
DEV_IOMTYPE,
NULL
};
status = DEV_createDevice("/codec", &DSK6X_EDMA_IOMFXNS,
If you plan to use an IOM mini-driver with SIO streams and the DIO adapter,
create a user-defined device statically or with a DEV_createDevice call
similar to that shown below:
DIO_Params dioCodecParams ={
"/codec",
NULL
};
DEV_Attrs dioCodecAttrs = {
NULL,
&dioCodecParams,
DEV_SIOTYPE,
NULL
};
status =
DEV_createDevice("/dio_codec", &DIO_tskDynamicFxns,
The driver function table passed to DEV_createDevice should be
DIO_tskDynamicFxns for use with tasks (TSKs) or DIO_cbDynamicFxns for
use with software interrupts (SWIs).
/* device id */
/* device parameters */
/* type of the device */
/* device global data ptr */
(Fxn)DSK6X_IOM_init, &gioAttrs);
/* device name */
/* chanParams */
/* device id */
/* device parameters */
/* type of the device */
/* device global data ptr */
(Fxn)DIO_init, &dioCodecAttrs);

Advertisement

Table of Contents
loading

Table of Contents