EVT_UFX_DEVICE_ADDRESSED callback function (ufxclient.h)

The client driver's implementation to assign an address on the function controller.

Syntax

EVT_UFX_DEVICE_ADDRESSED EvtUfxDeviceAddressed;

void EvtUfxDeviceAddressed(
  [in] UFXDEVICE unnamedParam1,
  [in] USHORT unnamedParam2
)
{...}

Parameters

[in] unnamedParam1

The handle to a USB device object that the client driver received in a previous call to the UfxDeviceCreate.

[in] unnamedParam2

New USB device address to assign.

Return value

None

Remarks

The client driver for the function host controller registers its EVT_UFX_DEVICE_ADDRESSED implementation with the USB function class extension (UFX) by calling the UfxDeviceCreate method.

The client driver indicates completion of this event by calling the UfxDeviceEventComplete method.

Examples


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();
}

Requirements

Requirement Value
Target Platform Windows
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header ufxclient.h
IRQL <=DISPATCH_LEVEL

See also

UfxDeviceCreate

UfxDeviceEventComplete