UfxDeviceNotifyHardwareReady 함수(ufxclient.h)

UFX에 하드웨어가 준비되었다는 것을 알 수 있습니다.

구문

void UfxDeviceNotifyHardwareReady(
  [in] UFXDEVICE UfxDevice
);

매개 변수

[in] UfxDevice

UfxDeviceCreate를 호출하여 드라이버가 만든 UFX 디바이스 개체에 대한 핸들입니다.

반환 값

없음

설명

클라이언트 드라이버는 일반적으로 다음 예제와 같이 EvtDeviceD0Entry 콜백 함수에서 UfxDeviceNotifyHardwareReady를 호출합니다.

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;
}

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows 10
대상 플랫폼 Windows
헤더 ufxclient.h
라이브러리 ufxstub.lib
IRQL DISPATCH_LEVEL