/* Step 1: detect all VXC-142 cards */
wSubVendor=0x61; wSubDevice=0x00; wSubAux=0x00;/* for VXC-142 */
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("There are %d VXC-142 cards in this PC\n",wBoards);
/* Step 2: save the resources for each VXC-142 card installed in the PC */
for (i=0; i<wBoards; i++)
{ PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&t1,&t2,&t3,&t4,&t5);
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress;
/* save all resources for this card */
wConfigSpace[i][1]=wIrq; /*
save all resources for this card */
}
/* Step 3: directly control the VXC-142 */
wBase=wConfigSpace[0][0]; /* get the base address of card_0 */
outport(wBase,1);
/* enable all D/I/O operations for card_0 */
wBase=wConfigSpace[1][0]; /* get the base address of card_1 */
outport(wBase,1);
/* enable all D/I/O operations for card_1 */
4.1.3 Show_PIO_PISO
Show_PIO_PISO(wSubVendor,wSubDevice,wSubAux)
•
wSubVendor
[IN] the subVendor ID of the board to be determined
•
wSubDevice
[IN] the subDevice ID of the board to be determined
•
wSubAux
[IN] the subAux ID of the board to be determined
The
Show_PIO_PISO
function will display a text string to identify the special
subIDs. The text string is the same as that defined in PIO.H
A demo program is as follows:
VXC Cards User’s Manual (Ver. 1.1, 06/09.2005, pmh-012-01) -----31