Bewerken

Delen via


UcmConnectorDataDirectionChanged function (ucmmanager.h)

Notifies the USB connector manager framework extension (UcmCx) with the new data role of a change in data role.

Syntax

void UcmConnectorDataDirectionChanged(
  [in] UCMCONNECTOR  Connector,
  [in] BOOLEAN       Success,
  [in] UCM_DATA_ROLE CurrentDataRole
);

Parameters

[in] Connector

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

[in] Success

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

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

[in] CurrentDataRole

A UCM_TYPEC_PARTNER value that indicates the new data role.

Return value

None

Remarks

UcmConnectorDataDirectionChanged returns STATUS_SUCCESS if the operation succeeds. Otherwise, this inline function can return an appropriate NTSTATUS value.

If the connector partner is attached, UcmCx updates the data role of the partner depending on the CurrentDataRole value. For example, if the client driver changes the data role to UcmTypeCPortStateUfp, UcmCx updates the role of the connector partner to UcmTypeCPortStateDfp.

UcmCx can change the data role of a connector, and invokes EVT_UCM_CONNECTOR_SET_DATA_ROLE. In response to that call, the client should perform the DR_Swap operation, and indicate success/failure of the operation by calling UcmConnectorDataDirectionChanged.

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 UcmConnectorDataDirectionChanged.

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