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実装を USB 関数クラス拡張機能 (UFX) に登録します。

クライアント ドライバーは、 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
Header ufxclient.h
IRQL PASSIVE_LEVEL

こちらもご覧ください