Omega OME-PIO-D144 User Manual
Page 51
OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001)
----- 49
ok=1;
outp(wBase+0xc8,0x00); /* CN2_PA is output */
outp(wBase+0xcc,0x01); /* CN3_PA is input */
outp(wBase+0xc4,3); /* select CN2_PA */
outp(wBase+0xc0,0x55); /* CN2_PA=0x55 */
outp(wBase+0xc4,6); /* select CN2_PA */
val=inp(wBase+0xc0)&0xff; /* read CN3_PA */
if (val != 0x55) ok=0;
outp(wBase+0xc4,3); /* select CN2_PA */
outp(wBase+0xc0,0xAA); /* CN2_PA=0xAA */
outp(wBase+0xc4,6); /* select CN3_PA */
val=inp(wBase+0xc0)&0xff; /* read CN3_PA */
if (val != 0xaa) ok=0;
printf("\nCard Number=%d, wBase=%x",card,wBase);
if (ok==1) printf(", Test OK"); else printf(", Test ERROR");
}
/* ----------------------------------------------------------- */
delay_ms(int t)
{
int i,j,k,l,m;
for (i=0; i for (j=0; j<100; j++) { m=0; for (k=0; k<100; k++) {l=(j+t)*i; m+=l;} } }