EVT_UFX_DEVICE_ADDRESSED funzione di callback (ufxclient.h)

Implementazione del driver client per assegnare un indirizzo sul controller di funzione.

Sintassi

EVT_UFX_DEVICE_ADDRESSED EvtUfxDeviceAddressed;

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

Parametri

[in] unnamedParam1

Handle a un oggetto dispositivo USB ricevuto dal driver client in una chiamata precedente a UfxDeviceCreate.

[in] unnamedParam2

Nuovo indirizzo del dispositivo USB da assegnare.

Valore restituito

nessuno

Osservazioni

Il driver client per il controller host della funzione registra la relativa implementazione EVT_UFX_DEVICE_ADDRESSED con l'estensione della classe di funzione USB (UFX) chiamando il metodo UfxDeviceCreate .

Il driver client indica il completamento di questo evento chiamando il metodo UfxDeviceEventComplete .

Esempio


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

Requisiti

Requisito Valore
Piattaforma di destinazione Windows
Versione KMDF minima 1.0
Versione UMDF minima 2,0
Intestazione ufxclient.h
IRQL <=DISPATCH_LEVEL

Vedi anche

UfxDeviceCreate

UfxDeviceEventComplete