PSDBUS_ACKNOWLEDGE_INT_ROUTINE callback function (ntddsd.h)
The PSDBUS_ACKNOWLEDGE_INT_ROUTINE prototype declares the routine that a Secure Digital (SD) device driver must call to acknowledge to the bus driver that it has finished processing the interrupt.
Syntax
PSDBUS_ACKNOWLEDGE_INT_ROUTINE PsdbusAcknowledgeIntRoutine;
NTSTATUS PsdbusAcknowledgeIntRoutine(
[in] PVOID Context
)
{...}
Parameters
[in] Context
Contains the interface context that the SdBusOpenInterface routine returns in the Context member of the SDBUS_INTERFACE_STANDARD structure.
Return value
Returns STATUS_UNSUCCESSFUL if the operation succeeds, or the appropriate error message if the operation fails.
Remarks
When an SD device asserts an interrupt, the bus driver disables the interrupt that the device asserted to allow the device driver to perform I/O at IRQL <=DISPATCH_LEVEL. When the device driver's callback routine, which is equivalent to an interrupt service routine, finishes clearing the interrupt, it should acknowledge that it has finished interrupt processing so that the bus driver can re-enable the disabled interrupt.
Traditionally, drivers acknowledge interrupts by simply returning the appropriate value from the interrupt service routine (ISR). When drivers rely on this method, they are constrained to acknowledge interrupts in the order that they receive them. An SD card driver, on the other hand, is not constrained to acknowledge interrupts in the order that they are received. Typically, a driver for an SD card might report several interrupts to the bus driver (see PSDBUS_CALLBACK_ROUTINE) before acknowledging any of them. Under normal operating conditions, an SD card driver defers acknowledging an interrupt until the interrupt state on the device has cleared.
The caller must be running at IRQL <= DISPATCH_LEVEL when it acknowledges that it has finished processing an interrupt.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | ntddsd.h (include Ntddsd.h) |
IRQL | <=DISPATCH_LEVEL (See Remarks section.) |