PCI-P16R16 Series Classic Driver
DLL Software Manual
User Manual, Ver. 1.3, Oct. 2015, Page: 24
/*
initiating PCI-P16R16 card and detect how many P16R16/P8R8 card in PC
*/
wRetVal=PCI_DriverInit(&wBoards);
printf("Threr are %d P16R16 Cards in this PC\n",wBoards);
if( wBoards==0 )
{
putch(0x07); putch(0x07); putch(0x07);
printf("There are no P16R16/P8R8 card in this PC !!!\n");
exit(0);
}
/*
dump every P16R16/P8R8 card's configuration address space
*/
for(i=0; i<wBoards; i++)
{
wRetVal=PCI_GetConfigAddressSpace(i,&wTypeID,
&wAddress0,&wAddress1,&wAddress2,
&wAddress3,&wAddress4,&wAddress5);
if( !wRetVal )
{
switch( wTypeID )
{
case 0: printf("==> %02d Board Name:PCI-P16R16\n",i);
P16R16_BaseAddress=wAddress2;
wP+;
break;
case 1: printf("==> %02d Board Name:PCI-P8R8\n",i);
P8R8_BaseAddress=wAddress2;
+;
break;
case 2: printf("==> %02d Board Name:PCI-TMC12\n",i);
break;
case 3: printf("==> %02d Board Name:PCI-DA16\n",i);
break;
case 4: printf("==> %02d Board Name:PCI-DA8\n",i);
break;
}
printf(" --> Addr0:%04x | Addr1:%04x | Addr2:%0x\n",
wAddress0,wAddress1,wAddress2);
printf(" --> Addr3:%04x | Addr4:%04x | Addr5:%0x\n\n",
wAddress3,wAddress4,wAddress5);
}
}