/* demo 3 : Square Wave Generator */ /* step 1 : all CLK select clock1=8M */ /* step 2 : run DEMO3.EXE */ /* step 3 : check all Cout of four 8254 by scope */ /* ----------------------------------------------------------- */ #include "PCITMC12.H" #include "dos.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; WORD pci_tmc12_do(WORD wDo); unsigned int check,v1,v2; unsigned long err,ok; int min,max,start,bug; int main() { unsigned int i,j,count,high,low; WORD wBoards,wRetVal,wPLX; char c; clrscr(); show_time(); show_time(); show_time(); 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