UID | title | description | old-location | tech.root | ms.date | keywords | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | f1_keywords | topic_type | api_type | api_location | api_name | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:ucmmanager.UcmConnectorTypeCAttach |
UcmConnectorTypeCAttach function (ucmmanager.h) |
Notifies the USB connector manager framework extension (UcmCx) when a partner connector is attached. |
buses\ucmconnectortypecattach.htm |
usbref |
05/07/2018 |
|
UcmConnectorTypeCAttach, UcmConnectorTypeCAttach method [Buses], buses.ucmconnectortypecattach, ucmmanager/UcmConnectorTypeCAttach |
ucmmanager.h |
Ucmcx.h |
Windows |
Windows 10 |
Windows Server 2016 |
1.15 |
2.15 |
UcmCxstub.lib |
PASSIVE_LEVEL |
Windows |
|
|
|
|
|
Notifies the USB connector manager framework extension (UcmCx) when a partner connector is attached.
Handle to the connector object that the client driver received in the previous call to UcmConnectorCreate.
A pointer to a driver-allocated UCM_CONNECTOR_TYPEC_ATTACH_PARAMS that has been initialized by calling UCM_CONNECTOR_TYPEC_ATTACH_PARAMS_INIT.
UcmConnectorTypeCAttach returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method can return an appropriate NTSTATUS value.
When a connection to a partner connector is detected, the client driver calls this method to notify UcmCx with information about the partner connector. That information includes the connector role, down stream or upstream facing port, the amount of current connector can draw or deliver, and charging state. UcmCx uses that information to perform certain operations. For example, it may determine the role of the partner connector attached, and configure the USB controller in host or peripheral mode.
Typically, every UcmConnectorTypeCAttach call has a subsequent UcmConnectorTypeCDetach call to notify UcmCx when the partner connector is detached. However, when a powered cable without an upstream port is attached (indicated by Params->PortPartnerType set to UcmTypeCPortStatePoweredCableNoUfp). The client driver can call UcmConnectorTypeCAttach again when a connection is detected to the upstream port to the powered cable.
UCM_CONNECTOR_TYPEC_ATTACH_PARAMS attachParams;
UCM_CONNECTOR_TYPEC_ATTACH_PARAMS_INIT(
&attachParams,
UcmTypeCPortStateDfp);
attachParams.CurrentAdvertisement = UcmTypeCCurrent1500mA;
status = UcmConnectorTypeCAttach(
Connector,
&attachParams);
if (!NT_SUCCESS(status))
{
TRACE_ERROR(
"UcmConnectorTypeCAttach() failed with %!STATUS!.",
status);
goto Exit;
}
TRACE_INFO("UcmConnectorTypeCAttach() succeeded.");
UCM_CONNECTOR_TYPEC_ATTACH_PARAMS