其他分享
首页 > 其他分享> > Plx使用手册学习------5 PlxPci_DriverProperties

Plx使用手册学习------5 PlxPci_DriverProperties

作者:互联网

Syntax:

PLX_STATUS
PlxPci_DriverProperties(
PLX_DEVICE_OBJECT *pDevice,
PLX_DRIVER_PROP *pDriverProp
);


PLX Chip Support:
All devices
Description:
Returns properties of the PLX driver in use for the selected device

返回所选设备使用的PLX驱动程序的属性
Parameters:
pDevice
Pointer to an open device
pDriverProp
A pointer to PLX_DRIVER_PROP structure that will contain the driver properties
Return Codes:

Code Description
ApiSuccess The function returned successfully
ApiNullParam One or more parameters is NULL
ApiInvalidDeviceInfo The device object is not valid

Usage:

PLX_STATUS rc;
PLX_DRIVER_PROP DriverProp;
PLX_DEVICE_OBJECT Device;
// Determine if Service or PnP driver in use
rc =
PlxPci_DriverProperties(
&Device,
&DriverProp
);
if (rc == ApiSuccess)
{
Cons_printf(
“Driver Properties:\n
“ Version : %d.%02d\n”
“ Name : %s\n”
“ Full Name: %s\n”,
DriverProp Version,
DriverProp.Name,
DriverProp.FullName
);
if (DriverProp.bIsServiceDriver)
{
Cons_printf(“Using PLX Service driver\n”,);
}
else
{
Cons_printf(“Using PLX PnP driver\n”,);
}
Cons_printf(
“PCIe Located at 0x%qX\n”,
DriverProp.AcpiPcieEcam
);
}

 

标签:Cons,DriverProperties,driver,DriverProp,PlxPci,使用手册,printf,device,PLX
来源: https://blog.csdn.net/u014626607/article/details/93984328