Syntax:
U32
PlxPci_PlxRegisterRead(
PLX_DEVICE_OBJECT *pDevice,
U32 offset,
PLX_STATUS *pStatus
);
PLX Chip Support:
All PLX devices
Description:
从所选设备读取PLX特定寄存器
Reads a PLX-specific register from the selected device
Parameters:
pDevice
指向一个开启的设备
Pointer to an open device
offset
PLX寄存器32位对齐偏移量
PLX register 32-bit aligned offset
pStatus
指向一个包含状态的PLX_STATUS变量
Pointer to a PLX_STATUS variable to contain the status. (May be NULL)
Return Codes:
Code | Description | |
ApiSuccess | The function returned successfully | |
ApiNullParam | One or more parameters is NULL | |
ApiInvalidDeviceInfo | The device object is not a valid PLX device or has not been opened | 设备对象不是有效的PLX设备或尚未打开 |
ApiInvalidOffset | The register offset is not aligned or is not one a PLX-specific register | 寄存器偏移未对齐或不是特定于PLX的寄存器 |
Notes:
For PLX 8000 series devices, the PLX driver will internally adjust the register offset based on the device port
number.
对于PLX 8000系列设备,PLX驱动程序将根据设备端口号在内部调整寄存器偏移量。
For example, if the selected PCI device is Port 8 of the PLX switch, the driver will add (8 * 4k) to the
offset parameter in order to access the correct register region for that specific port.
例如,如果所选PCI设备是PLX交换机的端口8,则驱动程序将(8*4K)添加到
偏移参数,以便访问该特定端口的正确寄存器区域。
Usage:
U32 RegValue;
PLX_STATUS rc;
// Read the PCI Control register
RegValue = PlxPci_PlxRegisterRead(pDevice,0x100C, /* PCI Control register*/&rc);
if (rc != ApiSuccess)
{
// ERROR – Unable to read PLX register
}
// Determine PCI clock rate
if (RegValue & (1 << 7))
// PCI clock is running at 66MHz
else
// PCI clock is running at 33MHz