ICP DAS USA PISO-P8R8U User Manual page 32

Table of Contents

Advertisement

case 'q': case 'Q':
break;
default:
printf("Invalid function item %c\n", c);
break;
}
if ( c == 'q' || c == 'Q' )
break;
}
PIO_DriverClose();
return 0;
}
int SelectBoard(WORD wBoardNo)
{
WORD wSubVendor,wSubDevice,wSubAux,wSlotBus,wSlotDevice;
WORD wIrqNo;
if ( wBoardNo >= wTotalBoardsFound )
{
printf("\nInvalid board number!\n");
return ExceedBoardNumber;
}
/************ Get Card Infomation (I/O Address) **************/
PIO_GetConfigAddressSpace(wBoardNo, &wCardAddress, &wIrqNo,
&wSubVendor, &wSubDevice, &wSubAux, &wSlotBus, &wSlotDevice);
printf("\nCurrent selected board is Card#%d at address 0x%04X\n",
wBoardNo, wCardAddress );
if ( wCardAddress == 0 )
return 100;
/************ Enable all DI/DO **************/
outpb(wCardAddress, 1);
PISO-P8R8U/P16R16U/PEX-P8R8i/P16R16i User Manual (Ver.1.6,Mar/2010, PMH-021-16) -
-
32

Advertisement

Table of Contents
loading

This manual is also suitable for:

Piso-p16r16uPex-p8r8iPex-p16r16i

Table of Contents