VxWorks API Reference : Driver Libraries
pciIntLib - PCI Shared Interrupt support
pciIntLibInit( ) - initialize the pciIntLib module
pciInt( ) - interrupt handler for shared PCI interrupt.
pciIntConnect( ) - connect the interrupt handler to the PCI interrupt.
pciIntDisconnect( ) - disconnect the interrupt handler (OBSOLETE)
pciIntDisconnect2( ) - disconnect an interrupt handler from the PCI interrupt.
This component is PCI Revision 2.1 compliant.
The functions addressed here include:
\i - Initialize the library. \i - Connect a shared interrupt handler. \i - Disconnect a shared interrupt handler. \i - Master shared interrupt handler.
Shared PCI interrupts are supported by three functions: pciInt( ), pciIntConnect( ), and pciIntDisconnect2( ). pciIntConnect( ) adds the specified interrupt handler to the link list and pciIntDisconnect2( ) removes it from the link list. The master interrupt handler pciInt( ) executes these interrupt handlers in the link list for a PCI interrupt. Each interrupt handler must check the device dependent interrupt status bit to determine the source of the interrupt, since it simply execute all interrupt handlers in the link list. pciInt( ) should be attached by intConnect( ) function in the BSP initialization with its parameter. The parameter is an vector number associated to the PCI interrupt.
pciIntLibInit( ) - initialize the pciIntLib module
STATUS pciIntLibInit (void)
This routine initializes the linked lists used to chain together the PCI interrupt service routines.
OK, or ERROR upon link list failures.
pciInt( ) - interrupt handler for shared PCI interrupt.
VOID pciInt ( int irq /* IRQ associated to the PCI interrupt */ )
This routine executes multiple interrupt handlers for a PCI interrupt. Each interrupt handler must check the device dependent interrupt status bit to determine the source of the interrupt, since it simply execute all interrupt handlers in the link list.
This is not a user callable routine
N/A
pciIntConnect( ) - connect the interrupt handler to the PCI interrupt.
STATUS pciIntConnect ( VOIDFUNCPTR * vector, /* interrupt vector to attach to */ VOIDFUNCPTR routine, /* routine to be called */ int parameter /* parameter to be passed to routine */ )
This routine connects an interrupt handler to a shared PCI interrupt vector. A link list is created for each shared interrupt used in the system. It is created when the first interrupt handler is attached to the vector. Subseqent calls to pciIntConnect just add their routines to the linked list for that vector.
OK, or ERROR if the interrupt handler cannot be built.
pciIntDisconnect( ) - disconnect the interrupt handler (OBSOLETE)
STATUS pciIntDisconnect ( VOIDFUNCPTR * vector, /* interrupt vector to attach to */ VOIDFUNCPTR routine /* routine to be called */ )
This routine disconnects the interrupt handler from the PCI interrupt line.
In a system where one driver and one ISR services multiple devices, this routine removes all instances of the ISR because it completely ignores the parameter argument used to install the handler.
Use of this routine is discouraged and will be obsoleted in the future. New code should use the pciIntDisconnect2( ) routine instead.
OK, or ERROR if the interrupt handler cannot be removed.
pciIntDisconnect2( ) - disconnect an interrupt handler from the PCI interrupt.
STATUS pciIntDisconnect2 ( VOIDFUNCPTR * vector, /* interrupt vector to attach to */ VOIDFUNCPTR routine, /* routine to be called */ int parameter /* routine parameter */ )
This routine disconnects a single instance of an interrupt handler from the PCI interrupt line.
This routine should be used in preference to the original pciIntDisconnect( ) routine. This routine is compatible with drivers that are managing multiple device instances, using the same basic ISR, but with different parameters.
OK, or ERROR if the interrupt handler cannot be removed.