新聞中心

pci卡設(shè)計(jì)心得

作者: 時(shí)間:2012-04-18 來(lái)源:網(wǎng)絡(luò) 收藏
px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">{
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);


關(guān)鍵詞: pci卡

評(píng)論


相關(guān)推薦

技術(shù)專區(qū)

關(guān)閉