ICP DAS USA PCI-P16C16 User Manual

Page 32

Advertising
background image

/*-------------------------------------------*/

wTotalBoards++; /* increment board number */
wGetAddress=1;

}

if( VendorID==0x1234 && DeviceID==0x0808 )
{ /*---------- PCI-P8R8 -----------*/

WhichLong=4; /* Base Address 0 */

WriteAddress(Bus,Device,Function,WhichLong);

dBaseAddress=_inpd(0xcfc);

wBaseAddr0=(WORD)(dBaseAddress&0xfffe);

wConfigSpace[wTotalBoards][0]=wBaseAddr0;

/*------------------------------------------*/

WhichLong=5; /* Base Address 1 */

WriteAddress(Bus,Device,Function,WhichLong);

dBaseAddress=_inpd(0xcfc);

wBaseAddr1=(WORD)(dBaseAddress&0xfffe);

wConfigSpace[wTotalBoards][1]=wBaseAddr1;


/*------------------------------------------*/

WhichLong=6; /* Base Address 2 */

WriteAddress(Bus,Device,Function,WhichLong);

dBaseAddress=_inpd(0xcfc);

wBaseAddr2=(WORD)(dBaseAddress&0xfffe);

wConfigSpace[wTotalBoards][2]=wBaseAddr2;

/*------------------------------------------*/

WhichLong=7; /* Base Address 3 */

WriteAddress(Bus,Device,Function,WhichLong);

dBaseAddress=_inpd(0xcfc);

wBaseAddr3=(WORD)(dBaseAddress&0xfffe);

wConfigSpace[wTotalBoards][3]=wBaseAddr3;

/*------------------------------------------*/

WhichLong=8; /* Base Address 4 */

WriteAddress(Bus,Device,Function,WhichLong);

PCI-P8R8/P16R16/P16C16/P16POR16 User’s Manual (Ver.2.2, 2005/5/5) …

32

Advertising
This manual is related to the following products: