Fonction UfxDevicePortDetectComplete (ufxclient.h)

Avertit UFX du type de port détecté.

Syntaxe

void UfxDevicePortDetectComplete(
  [in] UFXDEVICE       UfxDevice,
  [in] USBFN_PORT_TYPE PortType
);

Paramètres

[in] UfxDevice

Handle vers un objet de périphérique UFX que le pilote a créé en appelant UfxDeviceCreate.

[in] PortType

Contient une valeur d’énumération de type USBFN_PORT_TYPE.

Valeur de retour

None

Remarques

Le pilote client appelle UfxDevicePortDetectComplete lorsque la détection de port est terminée. Sur certaines plateformes, UFX peut utiliser le type de port signalé pour informer le gestionnaire de batterie du courant maximal qu’il peut tirer du port USB.

Le pilote client appelle généralement UfxDevicePortDetectComplete à partir de sa fonction de rappel EVT_UFX_DEVICE_PORT_DETECT , comme illustré dans cet exemple.

    // 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);

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 10
Plateforme cible Windows
En-tête ufxclient.h
Bibliothèque ufxstub.lib
IRQL DISPATCH_LEVEL