/* ----------------------------------------------------------- */ /* demo 5 : 16-bit event down counter */ /* step 1 : CNT1 select ECLK1 (JP22) */ /* step 2 : run demo5.exe */ /* step 3 : connect the external CNT signal to pin1 of CON1 */ /* ----------------------------------------------------------- */ #include "PCITMC12.H" WORD pci_tmc12_select8254(char cChip); WORD pci_tmc12_c0(char cConfig, char cLow, char cHigh); WORD pci_tmc12_c1(char cConfig, char cLow, char cHigh); WORD pci_tmc12_c2(char cConfig, char cLow, char cHigh); WORD wBaseAddr,wIrq,wPLX; int main() { int i,j; WORD wBoards,wRetVal; char c; unsigned int high,low,count; clrscr(); wRetVal=PTMC12_DriverInit(&wBoards); printf("\n(1) Threr are %d PCI-TMC12 Cards in this PC",wBoards); if ( wBoards==0 ) { putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PCI-TMC12 card in this PC !!!\n"); exit(0); } printf("\n(2) Show the Configuration Space of all PCI-TMC12:"); for(i=0; i