EVT_UFX_DEVICE_ADDRESSED回调函数 (ufxclient.h)
用于在函数控制器上分配地址的客户端驱动程序实现。
语法
EVT_UFX_DEVICE_ADDRESSED EvtUfxDeviceAddressed;
void EvtUfxDeviceAddressed(
[in] UFXDEVICE unnamedParam1,
[in] USHORT unnamedParam2
)
{...}
参数
[in] unnamedParam1
客户端驱动程序在对 UfxDeviceCreate的上一次调用中收到的 USB 设备对象的句柄。
[in] unnamedParam2
要分配的新 USB 设备地址。
返回值
没有
言论
函数主机控制器的客户端驱动程序通过调用 UfxDeviceCreate 方法向 USB 函数类扩展(UFX)注册其 EVT_UFX_DEVICE_ADDRESSED 实现。
客户端驱动程序通过调用 UfxDeviceEventComplete 方法指示完成此事件。
例子
EVT_UFX_DEVICE_ADDRESSED UfxDevice_EvtDeviceAddressed;
VOID
UfxDevice_EvtDeviceAddressed (
_In_ UFXDEVICE UfxDevice,
_In_ USHORT DeviceAddress
)
/*++
Routine Description:
EvtDeviceAddressed handler for the UFXDEVICE object.
Sets the Address indicated by 'DeviceAddress' on the controller.
Arguments:
UfxDevice - UFXDEVICE object representing the device.
DeviceAddress - USB Device Address, as determined by the UFX.
--*/
{
UNREFERENCED_PARAMETER(DeviceAddress);
TraceEntry();
//
// Set the device address on the controller
//
//
// #### Insert code to set the device address on controller ####
//
UfxDeviceEventComplete(UfxDevice, STATUS_SUCCESS);
TraceExit();
}
要求
要求 | 价值 |
---|---|
目标平台 | 窗户 |
最低 KMDF 版本 | 1.0 |
最低 UMDF 版本 | 2.0 |
标头 | ufxclient.h |
IRQL | <=DISPATCH_LEVEL |