pci卡設(shè)計(jì)心得
for(i=0;i16;i++)
{
DWORD_OUT(0xcf8,io_cf8+4*i);
buf[i]=DWORD_IN(0xcfc);
}
pciinf->VendorID=(WORD)(buf[0]0xffff);
pciinf->DeviceID=(WORD)((buf[0]0xffff0000)/0x10000);
pciinf->Command=(WORD)(buf[1]0xffff);
pciinf->Status=(WORD)((buf[1]0xffff0000)/0x10000);
pciinf->RevisionID=(UCHAR)(buf[2]0xff);
pciinf->CacheLineSize=(UCHAR)(buf[3]0xff);
pciinf->LatencyTimer=(UCHAR)((buf[3]0xff00)/0x100);
pciinf->HeaderType=(UCHAR)((buf[3]0xff0000)/0x10000);
評(píng)論