The
PIO_PISO.EXE
utility program will detect and display all VXC cards
installed in the PC.
4.1.1 PIO_DriverInit
PIO_DriverInit(&wBoards, wSubVendor, wSubDevice, wSubAux)
•
wBoards
[OUT] number of boards found in this PC
•
wSubVendor
[IN] Sub-vendor ID of the board to be determined
•
wSubDevice [IN] Sub-device ID of the board to be determined
•
wSubAux
[IN] Sub-aux ID of the board to be determined
The
PIO_DriverInit
function detects all VXC series cards in the system, and
is implemented based on the PCI plug & play mechanism. All VXC series cards
installed in this system will be detected and the resources will be saved in the
library.
Note:
The “
[IN]
” symbolic indicates that the parameter should assign a
value by users, while the “
[OUT]
” symbolic indicates that the parameter
will return a value after calling the function.
Sample program 1:
Determine the resources for all VXC-142 cards in the PC
wSubVendor=0x61; wSubDevice=0x00;
wSubAux=0x00;
/* for VXC-142 */
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("There are %d VXC-142 card(s) in this PC\n",wBoards);
/* Step 2: save the resources of all cards installed in the PC */
for (i=0; i<wBoards; i++)
{ PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wID1,&wID2,&wID3,
&wID4,&wID5);
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress; /* save all resources of this card */
wConfigSpace[i][1]=wIrq;
/* save all resources of this card */
}
VXC Cards User’s Manual (Ver. 1.1, 06/09.2005, pmh-012-01) -----29