TIP675-SW-42 – VxWorks Device Driver
Page 22 of 31
io_line
Specifies the I/O-line at which the callback function will be installed. Valid I/O lines are in range
from 1 to 48.
edge
This parameter specifies on which transition an interrupt is generated when the I/O data
changes. Valid values are:
Value
Description
T675_POS_EDGE
An interrupt will be generated on a Low to High transition
T675_NEG_EDGE
An interrupt will be generated on a High to Low transition
arg
This user defined argument will be passed in the 4
th
argument to the user supplied callback
function. This argument could be a semaphore ID, a message ID or whatever.
funcPtr
This parameter contains a pointer to a function to be called if the interrupt at the connected I/O
line occurred. The routine is invoked in supervisor mode at interrupt level. A proper C
environment is established, the necessary registers saved, and the stack is set up.
EXAMPLE
#include
"tip675.h"
…
/*-----------------------------
CALLBACK FUNCTION (INTERRUPT)
-----------------------------*/
static void callback
(
unsigned long base,
/* address of module */
unsigned long ioline,
/* Low Word: 1 – 48 */
/* High Word: [
T675_POS_EDGE| T675_LOW_EDGE
] */
T675_READ_STR *pvalue,
/* Read value */
unsigned long arg
/* User argument */
)
{
…
}
…