UcmConnectorPowerDirectionChanged function

Notifies the USB connector manager framework extension (UcmCx) with the new power role of the partner connector.

Syntax

void UcmConnectorPowerDirectionChanged(
  UCMCONNECTOR   Connector,
  BOOLEAN        Success,
  UCM_POWER_ROLE CurrentPowerRole
);

Parameters

Connector

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

Success

Used to indicate failure of a power-role swap that was initiated by UcmCx using EVT_UCM_CONNECTOR_SET_POWER_ROLE.

If TRUE, the operation was successful. FALSE, otherwise.

CurrentPowerRole

One of the UCM_POWER_ROLE-typed flags that indicates the new data role.

Return Value

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

Remarks

If the connector partner is attached, UcmCx updates the power role of the partner depending on the CurrentPowerRole value.

UcmCx can change the power role of a connector, and invokes EVT_UCM_CONNECTOR_SET_POWER_ROLE. In response to that call, the client should perform the PR_Swap operation, and indicate success/failure of the operation by calling UcmConnectorPowerDirectionChanged.

Alternatively, the client driver might choose to perform a role-swap autonomously, or the partner might perform a role-swap. In either case, when the role-swap has completed, the driver must report the new role to UcmCx using UcmConnectorPowerDirectionChanged.

Requirements

   
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