VxWorks uses Intconnect () to hook up the interrupt service program, but for PCI devices, the Pciintconnect () hook interrupt is generally used, and the main difference between it and Intconnect () is that the interrupt vector used by Intconnect () is exclusive, Pciintconnect () allows multiple external interrupts to share an interrupt vector. It internally uses a list to manage multiple ISR, when an interrupt occurs, each ISR on a linked list is called sequentially, and Pciintconnect () requires each ISR to be called, first to query whether the interrupt is generated for its own device, or not to return immediately to continue invoking the other ISR.
The application-oriented programming interface in VxWorks is Intconnect (), and its prototype is as follows:
STATUS intconnect (voidfuncptr *vector,voidfuncptr routine,int parameter)
which
Vector: The address of the interrupt vector to be hooked up;
Routine: Call ISR when interrupt occurs;
Parameter: The parameter passed to the IST.
It is generally necessary to use the Inum_to_ivec () function to process the terminal number when calling the Intconnect function.
Use of VxWorks interrupts