Data Sheet

Table Of Contents
64
Field Name
Description
SwapResponse
Defines the response type. Possible values:
PD_SWAPPOWERROLE_ACCEPT(default)
PD_SWAPPOWERROLE_WAIT
PD_SWAPPOWERROLE_REJECT
SkipSendingPSRDY
If set to PD_TRUE, PD_SwapPowerRole will not send the
PS_RDY message. Possible values:
PD_TRUE
PD_FALSE(Default)
SkipSwap
If set to PD_TRUE, PD_SwapPowerRole will not swap the
power role. Possible values:
PD_TRUE
PD_FALSE(Default)
WaitTimeout
Timeout(micro second) to wait in order to receive the
PR_SWAP message
Default: PD_DEFAULT_TIMEOUT_INFINIT
RetryCountOnWait
Indicates the retry count after receiving Wait Message in
response to sent PR_Swap Message.
Default: 2
RetryDelayOnWait
Indicates the retry delay time upon receiving Wait Message
in response to sent PR_Swap Message.
Default: 20000
Result
None
Examples
#Set swap power role settings as default
$settings = PD_SwapResponse_Settings
call PD_SetSwapPowerRoleSetting( $settings )
5.1.13 PD_SwapPowerRole
Tries to swap power role. It will start Swap Power Role AMS.
Format
Call PD_SwapPowerRole()
Parameters
None
Result
User can evaluate the command results(including sub-results) using IfMatched/ElseMatched
command.
List of result values:
Result Value
Description
PD_RESULT_OK
Command succeeded
PD_RESULT_FAILED
Command failed. In this case corresponding sub results
for PD_SendPacket and PD_ReceivePacket are valid
also (depends on the error type which has been occurred
during sending or receiving data).
PD_SUBRESULT_RESPONSE_TIMEOUT
Subresult - Response not received
PD_SUBRESULT_RESPONSE_REJECT
Subresult - Reject received as response
PD_SUBRESULT_RESPONSE_WAIT
Subresult - Wait received as response
PD_SUBRESULT_MSG_NOT_RECEIVED
Subresult - PS_RDY not received(PD Exerciser as Sink)
PD_SUBRESULT_RESPONSE_NOT_SUPPORTED
Rev3.0 only. Subresult - Not_Supported received as
response