User`s guide
58 • Operation Theorem
// header file declare
#include “pci_8134.h”
PCI_INFO info;
#define axis1 1
#define axis5 5
U16 int_flag=0, irq_axs;
U32 irq_sts;
/****************************************************************************/
/* MAIN Program */
/****************************************************************************/
void main( void )
{
U16 i, bn=0, status;
_8134_Initial (&bn, &info);
// Do System configuration for all I/O signals
…………………..
//
// Set Interrupt factors for axis1, axis5
set_int_factor(axis1, factor1);
set_int_factor(axis5, factor2);
// Enable Interrupt for both PCI-8134 cards
for(i=0; i<bn; i++)
_8134_Set_INT_Enable (i, 1);
// Main program for application
…………………..
// End of Main Program
for(i=0; i<bn; i++)
_8134_Close(i); // Close all IRQ resources
}
/****************************************************************************/
/* ISR begin here */
/****************************************************************************/
void interrupt _8134_isr0(void)
{
U16 int_axis;
U16 irq_status;
//
disable(); // disable all interrupt
_8134_Get_IRQ_Status (0, &irq_status);
if(irq_status) // Judge if INT for card 0?