PCI-1202/1602/180x Series Card
Multi-Function Boards
User Manual/ Ver. 4.8/ Mar. 2015/ PMH-0014-48/ Page: 52
P180x_DriverInit(..) Function
The P180X_DriverInit(..) can detect how many PCI-1800/1802 cards in the system. Then the
P180X_DriverInit(..) will detect the I/O address of these cards. The P180X_DriverInit(..) is
implemented based on the PCI plug&play mechanism-2. The P180X_DriverInit(..) must be called
once before all the other functions. The function P180X_DriverInit(..) is given as follows:
P180x_DriverInit(…) is designed for PCI-1800/1802 series
P1202_DriverInit(…) is designed for PEX-1202/PCI-1202 series
P1602_DriverInit(…) is designed for PCI-1602 series
This function can be detecting how many PEX-1202/PCI-1202/1602/180x series cards in the system.
Also can be detect and save the I/O resource information of every PEX-1202 and PCI-1202/1602/180x
series card.
The sample is given as follows:
wRetVal=
P180X_DriverInit
(&wBoards);
/* call P180X_DriverInit(..) first */
printf("Threr are %d P180X Cards in this PC\n",wBoards);
/* dump every P180X card's configuration address space */
printf("The Configuration Space -> Timer Control DIO AD/DA \n");
for (i=0; i<wBoards; i++)
{
printf("Card %02d: %04xH %04xH %04xH %04xH\n", i,wConfigSpace[i][0],
wConfigSpace[i][1], wConfigSpace[i][2],wConfigSpace[i][3]);
}
/* The P180X_ActiveBoard() function must be used to active a board, */
/* then all operation will take effect to the active board. */
printf("Now Active First P180X Card...\n");
P180X_ActiveBoard
( 0 );