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);
}
必要条件
要件 | 価値 |
---|---|
ターゲット プラットフォーム の | ウィンドウズ |
最小 KMDF バージョン | 1.0 |
UMDF の最小バージョン を する | 2.0 |
ヘッダー | ufxclient.h |
IRQL | PASSIVE_LEVEL |