TIP675-SW-42 – VxWorks Device Driver
Page 11 of 31
pParam
This parameter points to a structure (
TIP675_DEVCONFIG
) containing the default configuration
of the channel.
The structure (
TIP675_DEVCONFIG
) has the following layout and is defined in tip675.h:
typedef struct
{
struct ipac_resource *ipac;
} TIP675_DEVCONFIG;
ipac
Pointer
to
TIP675
module
resource
descriptor,
retrieved
by
CARRIER
Driver
ipFindDevice() function
EXAMPLE
#include
"tip675.h”
STATUS
result;
TIP675_DEVCONFIG
tip675Conf;
struct ipac_resource ipac;
/* IPAC CARRIER Driver initialization */
…
/*
**
Find an IP module from TEWS TECHNOLOGIES (manufacturer = 0xB3)
**
with model number MODEL_TIP675 (see tip675.h). This module does not
**
use interrupts and we need only the IO space base address for the
**
related driver.
*/
result = ipFindDevice(0xB3, MODEL_TIP675, 0,
IPAC_INT0_EN | IPAC_LEVEL_SENS | IPAC_CLK_8MHZ,
&ipac);
if (result == OK) {
devConfig.ipac = &ipac;
/*-------------------------------------------------------
Create the device "/tip675/0"
-------------------------------------------------------*/
tip675Conf.ipac =
&ipac;
…