EVT_UFX_DEVICE_PORT_DETECT 콜백 함수(ufxclient.h)

포트 검색을 시작하는 클라이언트 드라이버의 구현

구문

EVT_UFX_DEVICE_PORT_DETECT EvtUfxDevicePortDetect;

void EvtUfxDevicePortDetect(
  [in] UFXDEVICE unnamedParam1
)
{...}

매개 변수

[in] unnamedParam1

클라이언트 드라이버가 UfxDeviceCreate 메서드에 대한 이전 호출에서 받은 USB 디바이스 개체에 대한 핸들입니다.

반환 값

없음

설명

함수 호스트 컨트롤러의 클라이언트 드라이버는 UfxDeviceCreate 메서드를 호출하여 EVT_UFX_DEVICE_PORT_DETECT 구현을 UFX(USB 함수 클래스 확장)에 등록합니다.

클라이언트 드라이버는 UfxDevicePortDetectComplete 또는 UfxDevicePortDetectCompleteEx 메서드를 호출하여 포트 검색 완료를 나타내야 합니다.

예제

EVT_UFX_DEVICE_PORT_DETECT UfxDevice_EvtDevicePortDetect;

VOID
UfxDevice_EvtDevicePortDetect (
    _In_ UFXDEVICE UfxDevice
    )
/*++
Routine Description:

    Starts the port detection state machine

Arguments:

    UfxDevice - UFXDEVICE object representing the device.

--*/
{
    PUFXDEVICE_CONTEXT DeviceContext;
    PCONTROLLER_CONTEXT ControllerContext;

    DeviceContext = UfxDeviceGetContext(UfxDevice);
    ControllerContext = DeviceGetControllerContext(DeviceContext->FdoWdfDevice);

    //
    // #### TODO: Insert code to determine port/charger type ####
    // 
    // In this example we will return an unknown port type.  
    // This will allow UFX to connect to a host if one is present.  
    // UFX will timeout after 5 seconds if no host is present and transition to
    // an invalid charger type, which will allow the controller to exit D0.
    //

    UfxDevicePortDetectComplete(ControllerContext->UfxDevice, UsbfnUnknownPort);
}

요구 사항

요구 사항
대상 플랫폼 Windows
최소 KMDF 버전 1.0
최소 UMDF 버전 2.0
머리글 ufxclient.h
IRQL PASSIVE_LEVEL

추가 정보