Condividi tramite


EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL funzione di callback (ufxclient.h)

Implementazione del driver client per avviare la riattivazione remota nel controller della funzione.

Sintassi

EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL EvtUfxDeviceRemoteWakeupSignal;

VOID EvtUfxDeviceRemoteWakeupSignal(
  [in] UFXDEVICE unnamedParam1
)
{...}

Parametri

[in] unnamedParam1

Handle per un oggetto dispositivo USB ricevuto dal driver client in una chiamata precedente al metodo UfxDeviceCreate.

Valore restituito

Nessuno

Osservazioni

Il driver client per il controller host della funzione registra l'implementazione EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL 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.

Esempi

EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL UfxDevice_EvtDeviceRemoteWakeupSignal;

VOID
UfxDevice_EvtDeviceRemoteWakeupSignal (
 _In_ UFXDEVICE UfxDevice
 )
/*++
Routine Description:

 Signals Remote Wakeup to the Host by issuing a link state change command.
 It acquires and releases the power reference to ensure a valid power state
 before accessing the device.

Arguments:

 UfxDevice - UFXDEVICE object representing the device.

--*/
{
 NTSTATUS Status;
 PUFXDEVICE_CONTEXT DeviceContext;

 PAGED_CODE();

 TraceEntry();

 DeviceContext = UfxDeviceGetContext(UfxDevice);

 //
 // Stop Idle to ensure the device is in working state
 //

 Status = WdfDeviceStopIdle(DeviceContext->FdoWdfDevice, TRUE);
 if (!NT_SUCCESS(Status)) {
  TraceError("Failed to stop idle %!STATUS!", Status);
  goto End;
 }

 //
 // Issue a Link State Change Request.
 //

 //
 // #### TODO: Insert code to issue a link state change on the controller ####
 //

 WdfDeviceResumeIdle(DeviceContext->FdoWdfDevice);

End:
 UfxDeviceEventComplete(UfxDevice, Status);
 TraceExit();
}

Fabbisogno

Requisito Valore
piattaforma di destinazione Finestre
versione minima di KMDF 1.0
versione minima di UMDF 2.0
intestazione ufxclient.h
IRQL PASSIVE_LEVEL

Vedere anche