UcmConnectorPdPartnerSourceCaps function (ucmmanager.h)

Notifies the USB connector manager framework extension (UcmCx) with the power source capabilities of the partner connector.

Syntax

NTSTATUS UcmConnectorPdPartnerSourceCaps(
  [in] UCMCONNECTOR                Connector,
       UCM_PD_POWER_DATA_OBJECT [] Pdos,
  [in] UCHAR                       PdoCount
);

Parameters

[in] Connector

Handle to the connector object that the client driver received in the previous call to UcmConnectorCreate.

Pdos

A caller-allocated array of UCM_PD_POWER_DATA_OBJECT structures that describes the power source capabilities.

[in] PdoCount

Number of elements in the array specified by Pdos[].

Return value

UcmConnectorPdPartnerSourceCaps returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method can return an appropriate NTSTATUS value.

Remarks

When using a Type-C connector for charging by using the power delivery (PD) mechanism, the local connector queries the partner connector for its supported power sourcing capabilities. That query is not required if the partner connector is the power source because in that case, the local connector cached the initial advertisement when the partner connector was attached. If the source capabilities changed, it sends an update to the local connector.

If the partner connector is the power sink, the local connector port must query for the latest capabilities.

Examples

        UCM_PD_POWER_DATA_OBJECT Pdos[1];

        UCM_PD_POWER_DATA_OBJECT_INIT_FIXED(&Pdos[0]);

        Pdos[0].FixedSupplyPdo.VoltageIn50mV = 100;         // 5V
        Pdos[0].FixedSupplyPdo.MaximumCurrentIn10mA = 150;  // 1.5 A

        status = UcmConnectorPdPartnerSourceCaps(
            Connector,
            Pdos,
            ARRAYSIZE(Pdos));
        if (!NT_SUCCESS(status))
        {
            TRACE_ERROR(
                "UcmConnectorPdPartnerSourceCaps() failed with %!STATUS!.",
                status);
            goto Exit;
        }

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Minimum UMDF version 2.15
Header ucmmanager.h (include Ucmcx.h)
Library UcmCxstub.lib
IRQL PASSIVE_LEVEL

See also

UcmConnectorCreate