通知 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 |