本文整理汇总了C++中IOPCIDevice::configRead8方法的典型用法代码示例。如果您正苦于以下问题:C++ IOPCIDevice::configRead8方法的具体用法?C++ IOPCIDevice::configRead8怎么用?C++ IOPCIDevice::configRead8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOPCIDevice
的用法示例。
在下文中一共展示了IOPCIDevice::configRead8方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IOSimpleLockAlloc
int
at_sw_init(at_adapter *adapter)
{
at_hw *hw = &adapter->hw;
IOPCIDevice *pdev = adapter->pdev;
/* PCI config space info */
hw->vendor_id = pdev->configRead16(kIOPCIConfigVendorID);
hw->device_id = pdev->configRead16(kIOPCIConfigDeviceID);
hw->subsystem_vendor_id = pdev->configRead16(kIOPCIConfigSubSystemVendorID);
hw->subsystem_id = pdev->configRead16(kIOPCIConfigSubSystemID);
hw->revision_id = pdev->configRead8(kIOPCIConfigRevisionID);
hw->pci_cmd_word = pdev->configRead16(kIOPCIConfigCommand);
adapter->wol = 0;
adapter->ict = 50000; // 100ms
adapter->link_speed = SPEED_0; // hardware init
adapter->link_duplex = FULL_DUPLEX; //
hw->phy_configured = false;
hw->preamble_len = 7;
hw->ipgt = 0x60;
hw->min_ifg = 0x50;
hw->ipgr1 = 0x40;
hw->ipgr2 = 0x60;
hw->retry_buf = 2;
hw->max_retry = 0xf;
hw->lcol = 0x37;
hw->jam_ipg = 7;
hw->fc_rxd_hi = 0;
hw->fc_rxd_lo = 0;
hw->max_frame_size = 1500;
atomic_set(&adapter->irq_sem, 1);
adapter->stats_lock = IOSimpleLockAlloc();
adapter->tx_lock = IOSimpleLockAlloc();
return 0;
}