/****************************************************************************/ /* This program is developed by Microsoft C 5.1 */ /*****************************************************************************/ /* Demo 16: One P1602 Card demo. */ /* To estimate the performance for P1602_Do(), P1602_Di() and P1602_Da(). */ /*****************************************************************************/ #define MYLIB #include #include "P1602.H" clock_t StartTick,EndTick; int main() { int i,j; WORD wBoards,wRetVal; WORD wDIOdata,wOutput; float fSeconds,fMHz; DWORD dwI; WORD wAddrTimer,wAddrCtrl,wAddrDio,wAddrAdda; _clearscreen(0); gotoxy(1,1); // initiaing P1602 card and detect how many P1602 card in PC wRetVal=P1602_DriverInit(&wBoards); printf("Threr are %d P1602 Cards in this PC\n",wBoards); if( wBoards==0 ) { putch(0x07); putch(0x07); putch(0x07); printf("There are no P1602 card in this PC !!!\n"); exit(0); } /* dump every P1602 card's configuration address space */ printf("The Configuration Space -> Timer Control DIO AD/DA\n"); for(i=0; i