Share via


Función UfxDevicePortDetectComplete (ufxclient.h)

Notifica a UFX sobre el tipo de puerto que se detectó.

Sintaxis

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

Parámetros

[in] UfxDevice

Identificador de un objeto de dispositivo UFX que creó el controlador mediante una llamada a UfxDeviceCreate.

[in] PortType

Contiene un valor de enumeración de tipo USBFN_PORT_TYPE.

Valor devuelto

None

Observaciones

El controlador cliente llama a UfxDevicePortDetectComplete cuando se completa la detección de puertos. En algunas plataformas, UFX puede usar el tipo de puerto notificado para notificar al administrador de baterías la corriente máxima que puede extraer del puerto USB.

El controlador cliente normalmente llama a UfxDevicePortDetectComplete desde su EVT_UFX_DEVICE_PORT_DETECT función de devolución de llamada, como se muestra en este ejemplo.

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

Requisitos

Requisito Value
Cliente mínimo compatible Windows 10
Plataforma de destino Windows
Encabezado ufxclient.h
Library ufxstub.lib
IRQL DISPATCH_LEVEL