共用方式為


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