![background image](http://html1.mh-extra.com/html/icp-das-usa/pci-p8r8/pci-p8r8_user-manual_3730821035.webp)
/*-------------------------------------------*/
WhichLong=9;
/* Base Address 5 */
WriteAddress(Bus,Device,Function,WhichLong);
dBaseAddress=_inpd(0xcfc);
wBaseAddr5=(WORD)(dBaseAddress&0xfffe);
wConfigSpace[wTotalBoards][5]=wBaseAddr5;
/*---------- store the type name ID --------*/
wConfigSpace[wTotalBoards][6]=TYPE_P8R8;
wTota+;
/* increment board number */
wGetAddress=1;
}
}
}
if( wTotalBoards>16 )
return( NotFoundBoard );
else
return( NoError );
}
void WriteAddress(UCHAR bBus, UCHAR bDevice, UCHAR bFunction, UCHAR
bWhichLong)
{
DWORD dOutData;
WORD HiWord,LoWord;
UCHAR HiByte,LoByte;
HiWord=0x8000|bBus;
HiByte=(bDevice<<3)|bFunction;
LoByte=(bWhichLong<<2) & 0xfc;
LoWord=( (WORD)HiByte<<8 )|LoByte;
dOutData=( (DWORD)HiWord<<16 ) | LoWord;
_outpd(0xcf8,dOutData);
}
PCI-P16R16 Series User Manual (Ver.2.8, Apr. 2011, PMH-013-28)
33