Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function sets up a mapping between a network adapter driver's MiniportISRand MiniportHandleInterruptfunctions, already registered with NdisMRegisterMiniport, and the bus-relative vector and level on which its network adapter interrupts.
NDIS_STATUS NdisMRegisterInterrupt( OUT PNDIS_MINIPORT_INTERRUPT Interrupt , IN NDIS_HANDLE MiniportAdapterHandle , IN UINT InterruptVector , IN UINT InterruptLevel , IN BOOLEAN RequestIsr , IN BOOLEAN SharedInterrupt , IN NDIS_INTERRUPT_MODE InterruptMode );
Parameters
Value | Description |
---|---|
NdisInterruptLatched | Interrupts are triggered by a transition from low to high on the interrupt line. |
NdisInterruptLevelSensitive | Interrupts are active as long as the interrupt line is asserted. |
Return Values
Returns one of the following values:
Remarks
An network adapter driver must call this function from its MiniportInitializefunction if its network adapter generates interrupts. The driver of a network adapter that does not generate interrupts calls the NdisMInitializeTimerand NdisMSetPeriodicTimerfunctions instead of this function.
MiniportInitializemust call NdisMSetAttributesor NdisMSetAttributesExbefore calling this function.
MiniportInitializeobtains the bus-relative values passed to this function either from the registry or by calling a bus-type-specific Ndis XXXconfiguration function.
If its call to this function fails, MiniportInitializereleases all resources that it already allocated for its network adapter, and then fails initialization for that network adapter.
When interrupts are enabled on the network adapter, a driver's MiniportISRfunction can be called at any time following a successful call to this function, even during initialization. Such a driver's MiniportInitializefunction should not call this function until it has set up all state that the driver needs to handle an interrupt. The MiniportHandleInterruptfunction is not queued for subsequent execution if the driver's MiniportInitializefunction is currently executing and an interrupt occurs.
Whether a miniport with an ISR sets RequestIsrto TRUE when it calls this function or not, NDIS acknowledges the interrupt to the operating system so that interrupts from other devices are not blocked.
If a miniport sets RequestIsrto TRUE when it calls this function, it must dismiss the interrupt on its network adapter by setting the state of the network adapter so that it no longer asserts the interrupt. Interrupts can remain enabled on the network adapter following the dismissal of the interrupt, or they can be disabled, depending on the design of the driver. The timing of such a dismissal depends on the InterruptModespecified when the driver calls this function, as follows:
When a miniport supports full-duplex sends and receives, NDIS serializes calls to its MiniportISRor MiniportDisableInterruptfunction for sends. NDIS separately serializes calls to its MiniportISRor MiniportDisableInterruptfunction for all other operations that can cause an interrupt. Calls to the MiniportResetfunction are both synchronized and synchronous; NDIS prevents all other code paths in a full-duplex miniport from being entered while a device-reset operation is occurring.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ndis.h | Ndislib.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
MiniportDisableInterrupt, MiniportHalt, MiniportHandleInterrupt, MiniportISR, MiniportReset, NdisMDeregisterInterrupt, NdisMInitializeTimer, NdisMPciAssignResources, NdisMRegisterMiniport, NdisMSetAttributes, NdisMSetAttributesEx, NdisMSetPeriodicTimer, NdisMSynchronizeWithInterrupt, NdisOpenConfiguration, NdisReadPciSlotInformation