Omega OME-PIO-D56 User Manual page 29

Pci-bus digital i/o board
Table of Contents

Advertisement

3.1.1
PIO_DriverInit
PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux)
• wBoards=0 to N
• wSubVendor
• wSubDevice
• wSubAux
This function can detect all OME-PIO/PISO series card in the system. It is
implemented based on the PCI plug & play mechanism. It will find all OME-
PIO/PISO series cards installed in this system & save all their resource information in
the library.
Sample program 1: find all OME-PIO-D56/OME-PIO-D24 in the PC
wSubVendor=0x80; wSubDevice=1; wSubAux=0x40; /*
D56/D24 */
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("Threr are %d OME-PIO-D56/OME-PIO-D24 Cards in this PC\n",wBoards);
/* step2: save resources of all OME-PIO-D56/OME-PIO-D24 cards installed in
this PC */
for (i=0; i<wBoards; i++)
{
PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wID1,&wID2,&wID3,
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress;
wConfigSpace[i][1]=wIrq;
}
OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003)
number of boards found in this PC
subVendor ID of board to find
subDevice ID of board to find
subAux ID of board to find
&wID4,&wID5);
/* save all resource of this card
/* save all resource of this card
for
OME-PIO-
*/
*/
---- 27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ome-pio-d24

Table of Contents