Função UfxDeviceNotifyHardwareReady (ufxclient.h)

Notifica a UFX de que o hardware está pronto.

Sintaxe

void UfxDeviceNotifyHardwareReady(
  [in] UFXDEVICE UfxDevice
);

Parâmetros

[in] UfxDevice

Um identificador para um objeto de dispositivo UFX que o driver criou chamando UfxDeviceCreate.

Retornar valor

Nenhum

Comentários

O driver cliente normalmente chama UfxDeviceNotifyHardwareReady de sua função de retorno de chamada EvtDeviceD0Entry , conforme mostrado no exemplo a seguir.

NTSTATUS
OnEvtDeviceD0Entry (
  _In_ WDFDEVICE Device,
  _In_ WDF_POWER_DEVICE_STATE PreviousState
)
/*++

Routine Description:

    Called by the framework after entering D0 state.

Arguments:

    Device - WDFDEVICE framework handle to the bus FDO.

    PreviousState - The WDF_POWER_DEVICE_STATE from which the stack is
        making this transition.

Return Value:

    Returns STATUS_SUCCESS or an appropriate NTSTATUS code otherwise.

--*/
{
    PCONTROLLER_CONTEXT ControllerContext;

    TraceEntry();

    ControllerContext = DeviceGetControllerContext(Device);

    if (PreviousState > WdfPowerDeviceD1) { 
        DevicePerformSoftReset(Device);

        WdfWaitLockAcquire(ControllerContext->InitializeDefaultEndpointLock, NULL);
        ControllerContext->InitializeDefaultEndpoint = TRUE;
        WdfWaitLockRelease(ControllerContext->InitializeDefaultEndpointLock);
    }

    if (PreviousState == WdfPowerDeviceD3Final) {
        //
        // Notify UFX that HW is now ready
        //
        UfxDeviceNotifyHardwareReady(ControllerContext->UfxDevice);
    }

    TraceExit();
    return STATUS_SUCCESS;
}

Requisitos

Requisito Valor
Cliente mínimo com suporte Windows 10
Plataforma de Destino Windows
Cabeçalho ufxclient.h
Biblioteca ufxstub.lib
IRQL DISPATCH_LEVEL