/* demo 1 : D/O demo */ /* step 1 : connect a DB-16R to CON3 of PCI-TMC12 */ /* step 2 : run DEMO1.EXE */ /* step 3 : check the LEDs of DB-16R will turn on sequentially */ /* ----------------------------------------------------------- */ #include "PCITMC12.H" WORD pci_tmc12_do(WORD wDo); WORD wBaseAddr,wIrq,wPLX; int main() { int i,j; WORD wBoards,wRetVal; char c; 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 DO = %x",i,j); c=getch(); if ((c=='q') || (c=='Q')) return; j=j<<1; if (j==0) j=1; } PTMC12_DriverClose(); } /* ----------------------------------------------------------- */ WORD pci_tmc12_do(WORD wDo) { outport(wBaseAddr+0x14,wDo); return(NoError); }