Hi all
I try to program to get data from PCI digital I/O card. For get data with polling, it work well then i try to use interrupt it not work , alway waiting Interrupt. my some code is :
{
struct pci_dev_info info;
struct sigevent event;
void *hdl;
memset(&info,0,sizeof(info));
memset(&event, 0, sizeof(event));
event.sigev_notify = SIGEV_INTR;
ThreadCtl(_NTO_TCTL_IO, 0);
pci_attach(0);
info.VendorId = 0x144a;
info.DeviceId = 0x7348;
hdl = pci_attach_device(0,PCI_INIT_ALL, 0, &info);
}
BASE = mmap_device_io(info.BaseAddressSize],info.CpuBaseAddress [2]);
IRQNUM = info.irq;
irqid = InterruptAttachEvent(IRQNUM, &event, 0 );
while(1){
InterruptWait( NULL,NULL );
printf( " Interrup occur %d\n" ,count);
terruptUnmask( IRQNUM, irqid );
}
InterruptDetach( irqid );
}
What are my probelms ? and how to slove it