Syntax:
PLX_STATUS
PlxPci_NotificationCancel(
PLX_DEVICE_OBJECT *pDevice,
PLX_NOTIFY_OBJECT *pEvent
);
PLX Chip Support:
All PLX 9000 devices, 8311, 8000 DMA, 6000 NT, & 8000 NT
Description:
取消以前在plxpci_notificationregisterfor中注册的通知对象。
Cancels a notification object previously registered with PlxPci_NotificationRegisterFor.
Parameters:
pDevice
Pointer to an open device
pEvent
A pointer to a PLX notification object previously registered with PlxPci_NotificationRegisterFor.
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 |
ApiInvalidHandle | The PLX driver was unable to reference the event handle |
ApiInsufficientResources | Insufficient resources to create the notification object |
ApiFailed | The notification object is not valid or not registered |
Usage:
PLX_INTERRUPT IntSources;
PLX_STATUS rc;
PLX_NOTIFY_OBJECT Event;
// Clear interrupt sources
memset(&IntSources, 0, sizeof(PLX_INTERRUPT));5-80
// Register for interrupt notification
IntSources.Doorbell = (1 << 16) | 0xF; // Doorbells 16, & 0-3
IntSources.Message_0 = 1;
IntSources.ResetDeassert = 1;
IntSources.PmeDeassert = 1;
IntSources.GPIO_4_5 = 1;
IntSources.GPIO_14_15 = 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;
}
// Cancel interrupt notification
rc =
PlxPci_NotificationCancel(
pDevice,
&Event
);
if (rc != ApiSuccess)
{
// ERROR – Unable to cancel interrupt notification
}