SDPORT_CLEAR_EVENTS function
This callback routine clears the specified event mask.
Syntax
SDPORT_CLEAR_EVENTS ClearEvents;
void ClearEvents(
_In_ PVOID PrivateExtension,
_In_ ULONG EventMask
)
{ ... }
Parameters
PrivateExtension [in]
A pointer to a slot-specific device extension between the Secure Digital (SD) host driver, sdport.sys, and the miniport driver.EventMask [in]
A combination of the SDPORT_EVENT_XXX values that specifies the event mask to clear.
Return value
This function does not return a value.
Remarks
There are situations, especially during error recovery or tuning sequences, where the port driver may request that the miniport clear interrupt status to leave the controller in a clean state. Generally, this routine involves writing to the appropriate interrupt status bits to clear them.
Examples
The following example demonstrates an implementation of the ClearEvents callback. This example is an excerpt from the standard SD miniport driver, sdhc.sys. To see the source code for sdhc.sys, download the Standard SD Host Controller Miniport sample.
VOID
SdhcSlotClearEvents(
_In_ PVOID PrivateExtension,
_In_ ULONG EventMask
)
{
USHORT Interrupts;
PSDHC_EXTENSION SdhcExtension;
SdhcExtension = (PSDHC_EXTENSION) PrivateExtension;
Interrupts = SdhcConvertEventsToHwMask(EventMask);
SdhcAcknowledgeInterrupts(SdhcExtension, Interrupts);
}
Requirements
Minimum supported client |
Windows 10 |
Minimum supported server |
Windows Server 2016 Technical Preview |
Header |
Sdport.h |