次の方法で共有


UfxDevicePortDetectComplete 関数 (ufxclient.h)

検出されたポートの種類について UFX に通知します。

構文

void UfxDevicePortDetectComplete(
  [in] UFXDEVICE       UfxDevice,
  [in] USBFN_PORT_TYPE PortType
);

パラメーター

[in] UfxDevice

UfxDeviceCreate を呼び出してドライバーが作成した UFX デバイス オブジェクトハンドル。

[in] PortType

USBFN_PORT_TYPE型の列挙値を格納します。

戻り値

何一つ

備考

クライアント ドライバーは、ポート検出が完了したときに UfxDevicePortDetectComplete 呼び出します。 一部のプラットフォームでは、UFX は報告されたポートの種類を使用して、USB ポートから引き出すことができる最大電流をバッテリ マネージャーに通知することがあります。

この例に示すように、クライアント ドライバーは通常、EVT_UFX_DEVICE_PORT_DETECT コールバック関数から UfxDevicePortDetectComplete を呼び出します。

    // 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 10
ターゲット プラットフォーム ウィンドウズ
ヘッダー ufxclient.h
ライブラリ ufxstub.lib
IRQL DISPATCH_LEVEL