Syntax:
PLX_STATUS
PlxPci_NotificationWait(
PLX_DEVICE_OBJECT *pDevice,
PLX_NOTIFY_OBJECT *pEvent,
U64 Timeout_ms
);
PLX Chip Support:
All PLX 9000 devices, 8311, 8000 DMA, 6000 NT, & 8000 NT
Description:
等待与PLX通知对象相关联的特定中断发生或直到超时。
Wait for a specific interrupt(s) associated with a PLX notification object to occur or until the timeout is reached.
Parameters:
pDevice
Pointer to an open device
pEvent
A pointer to a PLX notification object previously registered with PlxPci_NotificationRegisterFor.
Timeout_ms
The desired time to wait, in milliseconds, for the event to occur.
To wait forever, use the pre-defined value PLX_TIMEOUT_INFINITE.
Return Codes:
| Code | Description |
| ApiSuccess | The function returned successfully and at least one event ocurred |
| ApiNullParam | One or more parameters is NULL |
| ApiInvalidDeviceInfo | The device object is not a valid PLX device or has not been opened |
| ApiFailed | The notification object is not valid or not registered |
| ApiWaitTimeout | Reached timeout waiting for event |
| ApiWaitCanceled | Wait event was cancelled |
Usage:
PLX_STATUS rc;
PLX_INTERRUPT IntSources;
PLX_NOTIFY_OBJECT Event;
// Clear interrupt sources
memset(&IntSources, 0, sizeof(PLX_INTERRUPT));
// Register for interrupt notification
IntSources.DmaChannel_0 = 1;
rc =PlxPci_NotificationRegisterFor(pDevice,&IntSources,&Event);
if (rc != ApiSuccess)
{
// ERROR – Unable to register interrupt notification
}
// Wait for the interrupt
rc =PlxPci_NotificationWait(pDevice,&Event,10 * 1000 /* 10 second timeout*/);
switch (rc)
{
case ApiSuccess:
// Interrupt occurred
break;
case ApiWaitTimeout:
// ERROR - Timeout waiting for Interrupt Event
break;
case ApiWaitCanceled:
// ERROR – Event not registered for wait
break;
}
本文详细介绍了PLX_PCI_NotificationWait函数的使用方法,该函数用于等待与PLX通知对象相关联的特定中断发生或直到超时。文章解释了参数含义,包括设备指针、事件对象和超时时间,以及返回代码的解读,如成功、空参数、无效设备信息等。

被折叠的 条评论
为什么被折叠?



