Funzione UfxDevicePortDetectComplete (ufxclient.h)

Notifica a UFX il tipo di porta rilevato.

Sintassi

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

Parametri

[in] UfxDevice

Handle per un oggetto dispositivo UFX creato dal driver chiamando UfxDeviceCreate.

[in] PortType

Contiene un valore di enumerazione di tipo USBFN_PORT_TYPE.

Valore restituito

nessuno

Osservazioni

Il driver client chiama UfxDevicePortDetectComplete al termine del rilevamento delle porte. In alcune piattaforme, UFX può usare il tipo di porta segnalato per notificare al gestore della batteria la corrente massima che può disegnare dalla porta USB.

Il driver client chiama in genere UfxDevicePortDetectComplete dalla relativa funzione di callback EVT_UFX_DEVICE_PORT_DETECT , come illustrato in questo esempio.

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

Requisiti

Requisito Valore
Client minimo supportato Windows 10
Piattaforma di destinazione Windows
Intestazione ufxclient.h
Libreria ufxstub.lib
IRQL DISPATCH_LEVEL