Sample program 2: Detect all PIO/PISO cards installed in this PC. (Refer to
Sec. 4.1 for more information)
/* Step 1: Detect all PIO/PISO series cards installed in this PC */
wRetVal=PIO_DriverInit(&wBoards,0xff,0xff,0xff);
/* Detect all PIO_PISO series
cards */
printf("\nThere are %d PIO_PISO Cards in this PC",wBoards);
if (wBoards==0 ) exit(0);
/* Step 2: Save the
resource information for all PIO/PISO cards installed in this PC */
printf("\n-----------------------------------------------------");
for(i=0; i<wBoards; i++)
{
PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,
&wSubDevice,&wSubAux,&wSlotBus,&wSlotDevice);
printf("\nCard_%d:wBase=%x,wIrq=%x,subID=[%x,%x,%x],
SlotID=[%x,%x]",i,wBase,wIrq,wSubVendor,wSubDevice,
wSubAux,wSlotBus,wSlotDevice);
printf(" --> ");
ShowPioPiso(wSubVendor,wSubDevice,wSubAux);
}
PIO-DA/PISO-DA Series User Manual (Ver.2.9, Feb. 2011, PMH-009-29 )
42