char c;
clrscr();
P1002_DriverInit(&wBoards);
printf("\n(1) Threr are %d
{
putch(0x07); putch(0x07); putch(0x07);
printf("(1) There are no
}
printf("\n(2) Show the Configuration Space of all
{
P1002_GetConfigAddressSpace(i,&wBaseAddr,&wIrq,&wPLX);
printf("\n Card_%d: wBaseAddr=%x, wIrq=%x, wPLX=%x",i,wBaseAddr,wIrq,wPLX);
}
P1002_GetConfigAddressSpace(0,&wBaseAddr,&wIrq,&wPLX); /* select card_0 */ printf("\n(3) *** Card_0, wBaseAddr=%x ***\n",wBaseAddr);
SetupTimer(0,1); | // AdPolling have to disable timer 0 |
AdPolling(0,0,23); | // channel=0, |
for(i=0;i<10;i++)
{
outp(wBaseAddr+0x1c,01); // A/D software tirgger while(1)
{
if( ((inpw(wBaseAddr+0x10))&0x01)==1) // check A/D busy? break;
}
wAdData=((inpw(wBaseAddr+0x30))&0x0fff);
}
P1002_DriverClose();
}
43