次の方法で共有


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
対象プラットフォーム Windows
ヘッダー ufxclient.h
Library ufxstub.lib
IRQL DISPATCH_LEVEL