Describes the PDStack Function prototypes.
Functions | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Init (cy_stc_pdstack_context_t *ptrPdStackContext, cy_stc_usbpd_context_t *ptrUsbPdContext, const cy_stc_pdstack_port_cfg_t *ptrPortCfg, cy_stc_pdstack_app_cbk_t *ptrAppCbk, const cy_stc_pdstack_dpm_params_t *ptrDpmParams, cy_stc_pdutils_sw_timer_t *ptrTimerContext) |
Initializes the device policy manager with callback pointers and loads the port configuration information from the port config table. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Start (cy_stc_pdstack_context_t *ptrPdStackContext) |
Makes the specified USB Type-C port operational. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Stop (cy_stc_pdstack_context_t *ptrPdStackContext) |
Stops the port operation. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Disable (cy_stc_pdstack_context_t *ptrPdStackContext) |
Disables the PD port operation and limits it to receiving hard reset signaling. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_PrepareDeepSleep (cy_stc_pdstack_context_t *ptrPdStackContext, bool *ptrDeepSleep) |
Configures the PD policy manager and Type-C manager state machines to allow the EZ-PD(TM) PMG1 device to be placed in DeepSleep. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Resume (cy_stc_pdstack_context_t *ptrPdStackContext, bool *ptrResume) |
Resumes the Type-C manager and PD policy engine state machines after the EZ-PD(TM) PMG1 device has woken up from DeepSleep. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsSleepAllowed (cy_stc_pdstack_context_t *ptrPdStackContext, bool *ptrSleepAllowed) |
Checks if the PD policy engine and Type-C manager state machines corresponding to the specified Type-C port are idle. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Rtos_Init (cy_stc_pdstack_context_t *ptrPdStackContext, cy_stc_pdstack_rtos_context_t *ptrRtosContext) |
Initializes the device policy manager with RTOS context details. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_AltModeInitContext (cy_stc_pdstack_context_t *ptrPdStackContext, void *ptrAltModeContext) |
Initializes the PDStack context with the alternate mode layer context details. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_HpiInitContext (cy_stc_pdstack_context_t *ptrPdStackContext, void *ptrHpiContext) |
Initializes the PDStack context with the HPI context details. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Task (cy_stc_pdstack_context_t *ptrPdStackContext) |
Runs the Type-C manager and PD policy manager tasks for the specified port. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SendPdCommand (cy_stc_pdstack_context_t *ptrPdStackContext, cy_en_pdstack_dpm_pd_cmd_t cmd, cy_stc_pdstack_dpm_pd_cmd_buf_t *ptrCmdBuf, bool isResp, cy_pdstack_dpm_pd_cmd_cbk_t cmdCbk) |
Provides an interface for the application module to send PD commands. More... | |
cy_en_pdstack_status_t | Cy_Pdstack_Dpm_SendPdCommandEc (cy_stc_pdstack_context_t *ptrPdStackContext, cy_en_pdstack_dpm_pd_cmd_t cmd, cy_stc_pdstack_dpm_pd_cmd_buf_t *ptrCmdBuf, cy_pdstack_dpm_pd_cmd_cbk_t cmdCbk) |
Provides an interface for the HPI module to send PD commands. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SendTypecCommand (cy_stc_pdstack_context_t *ptrPdStackContext, cy_en_pdstack_dpm_typec_cmd_t cmd, cy_pdstack_dpm_typec_cmd_cbk_t cmdCbk) |
Provides an interface for the application module to send commands to the Type-C connection manager. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ProtReset (cy_stc_pdstack_context_t *ptrPdStackContext, cy_en_pd_sop_t sop) |
Resets PD protocol layer (transmit and receive) message ID counters for the specified PD packet type. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ProtResetRx (cy_stc_pdstack_context_t *ptrPdStackContext, cy_en_pd_sop_t sop) |
Resets the PD receive message counter for the specified packet type. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_PeStop (cy_stc_pdstack_context_t *ptrPdStackContext) |
Stops the policy engine. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_Pd3SrcRpFlowControl (cy_stc_pdstack_context_t *ptrPdStackContext, bool blockSinkAms) |
Used to specify whether to keep the Rp termination at SinkTxNG or SinkTxOK while acting as a PD 3.0 source. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsIdle (cy_stc_pdstack_context_t *ptrPdStackContext, bool *ptrIsIdle) |
Checks whether the Type-C/PD stack is idle. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ClearSolnBusy (cy_stc_pdstack_context_t *ptrPdStackContext) |
Informs the Type-C/PD stack that the solution state allows Type-C transitions. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetSolnBusy (cy_stc_pdstack_context_t *ptrPdStackContext) |
Informs the Type-C/PD stack that the solution state does not allow Type-C transitions. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetCf (cy_stc_pdstack_context_t *ptrPdStackContext, bool status) |
Sets/clears the current foldback status. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_PpsTask (cy_stc_pdstack_context_t *ptrPdStackContext) |
Monitors the PPS activity. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsRdoValid (cy_stc_pdstack_context_t *ptrPdStackContext, cy_pd_pd_do_t rdo) |
Evaluates any RDO with respect to the current source cap of the specified context. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateDisCounter (cy_stc_pdstack_context_t *ptrPdStackContext, bool clear) |
Clears the DPM to disable the requests counter. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateUsbComm (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t state) |
Updates the USB communication capable bit. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSnkUsbSusp (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t state) |
Updates the sink USB suspend enable bit. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetBCRFaultStat (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t value) |
Sets the BCR fault bit status. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ClearBCRFaultStat (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t value) |
Clears the BCR fault bit status. More... | |
bool | Cy_PdStack_Dpm_GetBistStmEn (cy_stc_pdstack_context_t *ptrPdStackContext) |
Gets the BIST STM enabled/disabled flag. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetBistStmEn (cy_stc_pdstack_context_t *ptrPdStackContext, bool value) |
Sets the BIST STM enabled/disabled flag. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateExtSrcCap (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t *ptrBuf) |
Updates the extended source capabilities for the PD port. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ClearFaultActive (cy_stc_pdstack_context_t *ptrPdStackContext) |
Clears the internal fault active flags. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsPrevContractValid (cy_stc_pdstack_context_t *ptrPdStackContext) |
Checks if the previous contract is valid, the previous contract may become invalid because of runtime update of the source caps. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdatePortConfig (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t role, uint8_t dflt_role, bool toggle_en, uint8_t try_src_snk_en) |
Allows changing the PD port configuration parameters such as port role, default port role, DRP toggle enable, and Try.Src enable at runtime. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateFrsEnable (cy_stc_pdstack_context_t *ptrPdStackContext, bool frsRxEn, bool frsTxEn) |
Allows to enable/disable the PD 3.0 FRS functionality. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ClearHardResetCount (cy_stc_pdstack_context_t *ptrPdStackContext) |
Clears the hard reset count. More... | |
uint16_t | Cy_PdStack_Dpm_GetVbusVoltage (cy_stc_pdstack_context_t *ptrPdStackContext) |
Uses the application-provided callback to measure the current VBus voltage. More... | |
cy_en_pdstack_usb_data_sig_t | Cy_PdStack_Dpm_GetCableUsbCap (cy_stc_pdstack_context_t *ptrPdStackContext) |
Retrieves the type of USB signaling supported by the Type-C cable in use. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetDelaySrcCapStart (cy_stc_pdstack_context_t *ptrPdStackContext, uint16_t delay) |
Facilitates delaying the starting of source cap on Type-C attach. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetAlert (cy_stc_pdstack_context_t *ptrPdStackContext, cy_pd_pd_do_t alert_ado) |
Sets alert ADO on OCP/OVP fault. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_DowngradePdRev (cy_stc_pdstack_context_t *ptrPdStackContext) |
Allows downgrading the PD revision. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateExtSnkCap (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t *ptrBuf) |
Allows updating the extended sink capabilities for the PD port. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetFaultActive (cy_stc_pdstack_context_t *ptrPdStackContext) |
Sets internal flags to indicate that any fault (OVP/OCP/OTP, etc.) is active. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetChunkXferRunning (cy_stc_pdstack_context_t *ptrPdStackContext, cy_en_pdstack_ams_type_t amsType) |
Sets the chunk transfer type. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SendHardReset (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t reason) |
Attempts to send USB PD hard reset to port partner. More... | |
uint32_t | Cy_PdStack_Dpm_GetPdPortStatus (cy_stc_pdstack_context_t *ptrPdStackContext) |
Returns the PD port status as expected by the embedded controller. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSwapResponse (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t value) |
Updates the USB PD data role, power role, and vconn swap responses. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdatePpsSrcEn (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t ppsSrcEn) |
Updates the PD port PPS Source Enable field. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdatePpsSnkEn (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t ppsSnkEn) |
Updates the PD port PPS Sink Enable field. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdatePortStatus (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t *status_p, uint8_t offset, uint8_t byte_cnt) |
Updates the PD port status returned in response to a Get_Status command. More... | |
bool | Cy_PdStack_Dpm_RefreshSrcCap (cy_stc_pdstack_context_t *ptrPdStackContext) |
Refreshes the source cap at runtime. More... | |
bool | Cy_PdStack_Dpm_RefreshSnkCap (cy_stc_pdstack_context_t *ptrPdStackContext) |
Refreshes the sink cap at runtime. More... | |
cy_pd_stack_conf_t | Cy_PdStack_Dpm_GetStackConfig (cy_stc_pdstack_context_t *ptrPdStackContext) |
Retrieves the configurable switch values at runtime. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ChangeEprActiveFlag (cy_stc_pdstack_context_t *ptrPdStackContext, bool flag) |
Change the state of the EPR mode active flag. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsEprModeActive (cy_stc_pdstack_context_t *ptrPdStackContext, bool *isActive) |
Checks whether the EPR mode is active. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ChangeEprToSpr (cy_stc_pdstack_context_t *ptrPdStackContext, bool flag) |
Changes the EPR to SPR indicator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsEprSpr (cy_stc_pdstack_context_t *ptrPdStackContext, bool *isSpr) |
Checks whether the EPR PDO needs to limit it to SPR. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsEprAvsModeActive (cy_stc_pdstack_context_t *ptrPdStackContext, bool *isActive) |
Checks whether the EPR AVS mode is active. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_ChangeEprAvsActiveFlag (cy_stc_pdstack_context_t *ptrPdStackContext, bool flag) |
Change the state of the EPR AVS mode active flag. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_IsValidAvsReq (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t src_pdo_index, cy_pd_pd_do_t rdo) |
Evaluates the AVS RDO with respect to the selected AVS PDO. More... | |
void | Cy_PdStack_Dpm_EprSnkSendKeepAliveCb (cy_timer_id_t id, void *ptrContext) |
Callbacks to initiate the Keepalive message. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSnkMaxMin (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t count, uint16_t *max_min) |
Updates the sink max/min current/power at runtime thereby overriding the generated configuration by EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSnkCapMask (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t mask) |
Update the sink PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSnkCap (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t count, cy_pd_pd_do_t *pdo) |
Updates the sink PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSrcCapMask (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t mask) |
Updates the source PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateSrcCap (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t count, cy_pd_pd_do_t *pdo) |
Update the source PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateEprSrcCap (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t count, cy_pd_pd_do_t *pdo) |
Updates the EPR source PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateEprSrcCapMask (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t mask) |
Update the EPR source PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateEprSnkCap (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t count, cy_pd_pd_do_t *pdo) |
Updates the EPR sink PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateEprSnkCapMask (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t mask) |
Updates the EPR sink PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateEprSnkMaxMin (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t count, uint16_t *max_min) |
Updates the EPR sink max/min current/power at runtime thereby overriding the generated configuration by EZ-PD(TM) Configurator. More... | |
bool | Cy_PdStack_Dpm_GetAutoVcsEnabled (cy_stc_pdstack_context_t *ptrPdStackContext) |
Checks whether the automatic VConn swap is enabled. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateAutoVcsEnable (cy_stc_pdstack_context_t *ptrPdStackContext, bool val) |
Enables/disables the automatic VConn swap by the PD policy engine. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateVconnRetain (cy_stc_pdstack_context_t *ptrPdStackContext, uint8_t val) |
Enables/disables the VConn retain setting. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_SetDataReset (cy_stc_pdstack_context_t *ptrPdStackContext, bool value) |
Enables/disables the data reset support. More... | |
cy_en_pdstack_status_t | Cy_PdStack_Dpm_UpdateTimingParams (cy_stc_pdstack_context_t *ptrPdStackContext, cy_stc_pdstack_pd_timer_params_t *ptrPdTimerParams) |
Used to override the default values of the following PDStack timer periods: PD2 sender response timer period PD3 sender response timer period CC debounce timer period Maximum cable discovery count. More... | |
cy_stc_pdstack_context_t * | Cy_PdStack_Dpm_GetContext (uint8_t port) |
This API returns the pointer to the cy_stc_pdstack_context_t of the given port. More... | |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Init | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_stc_usbpd_context_t * | ptrUsbPdContext, | ||
const cy_stc_pdstack_port_cfg_t * | ptrPortCfg, | ||
cy_stc_pdstack_app_cbk_t * | ptrAppCbk, | ||
const cy_stc_pdstack_dpm_params_t * | ptrDpmParams, | ||
cy_stc_pdutils_sw_timer_t * | ptrTimerContext | ||
) |
Initializes the device policy manager with callback pointers and loads the port configuration information from the port config table.
This function also initializes the PD policy engine and Type-C connection manager.
ptrPdStackContext | PDStack library context pointer. |
ptrUsbPdContext | USB PD driver context pointer. |
ptrPortCfg | Port configuration pointer. |
ptrAppCbk | Application callback function pointer. |
ptrDpmParams | Pointer to the DPM parameter information structure. |
ptrTimerContext | Pointer to soft timer context structure. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Start | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Makes the specified USB Type-C port operational.
The port to be updated is specified by passing the PD stack context corresponding to it.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Stop | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Stops the port operation.
The USB PD block corresponding to the port will be disabled.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Disable | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Disables the PD port operation and limits it to receiving hard reset signaling.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_PrepareDeepSleep | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | ptrDeepSleep | ||
) |
Configures the PD policy manager and Type-C manager state machines to allow the EZ-PD(TM) PMG1 device to be placed in DeepSleep.
If the state machines are not in a busy state, the USB PD block is configured to trigger a wake-up interrupt on any activity and the location pointed by ptrDeepSleep is set to true. If the state machines are busy, the location pointed by ptrDeepSleep is set to false to indicate that the EZ-PD(TM) PMG1 device shall not proceed into DeepSleep.
ptrPdStackContext | PDStack library context pointer. |
ptrDeepSleep | Output parameter contains true if DeepSleep is possible and configured, otherwise false. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Resume | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | ptrResume | ||
) |
Resumes the Type-C manager and PD policy engine state machines after the EZ-PD(TM) PMG1 device has woken up from DeepSleep.
It needs to be called to resume the stack operation if Cy_PdStack_Dpm_PrepareDeepSleep has previously been called and returned true. This needs to be done even if the EZ-PD(TM) PMG1 device did not go into DeepSleep because of other reasons.
ptrPdStackContext | PDStack library context pointer. |
ptrResume | Output parameter contains true if successful otherwise, false. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsSleepAllowed | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | ptrSleepAllowed | ||
) |
Checks if the PD policy engine and Type-C manager state machines corresponding to the specified Type-C port are idle.
If this function indicates that the state machines are busy, DeepSleep entry using the Cy_PdStack_Dpm_PrepareDeepSleep should not be attempted.
ptrPdStackContext | PDStack library context pointer. |
ptrSleepAllowed | Output parameter contains true if possible to go into sleep mode, otherwise false. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Rtos_Init | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_stc_pdstack_rtos_context_t * | ptrRtosContext | ||
) |
Initializes the device policy manager with RTOS context details.
ptrPdStackContext | PDStack library context pointer. |
ptrRtosContext | Pointer to RTOS API's callback context. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_AltModeInitContext | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
void * | ptrAltModeContext | ||
) |
Initializes the PDStack context with the alternate mode layer context details.
ptrPdStackContext | PDStack library context pointer. |
ptrAltModeContext | Pointer to the alternate mode context. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_HpiInitContext | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
void * | ptrHpiContext | ||
) |
Initializes the PDStack context with the HPI context details.
ptrPdStackContext | PDStack library context pointer. |
ptrHpiContext | Pointer to the HPI context. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Task | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Runs the Type-C manager and PD policy manager tasks for the specified port.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SendPdCommand | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_en_pdstack_dpm_pd_cmd_t | cmd, | ||
cy_stc_pdstack_dpm_pd_cmd_buf_t * | ptrCmdBuf, | ||
bool | isResp, | ||
cy_pdstack_dpm_pd_cmd_cbk_t | cmdCbk | ||
) |
Provides an interface for the application module to send PD commands.
ptrPdStackContext | PDStack library context pointer. |
cmd | Type of command to be initiated. |
ptrCmdBuf | Pointer to the command buffer. |
isResp | Set to true when the API is called to send a response to the previously received PD messages. |
cmdCbk | Pointer to the callback function. |
cy_en_pdstack_status_t Cy_Pdstack_Dpm_SendPdCommandEc | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_en_pdstack_dpm_pd_cmd_t | cmd, | ||
cy_stc_pdstack_dpm_pd_cmd_buf_t * | ptrCmdBuf, | ||
cy_pdstack_dpm_pd_cmd_cbk_t | cmdCbk | ||
) |
Provides an interface for the HPI module to send PD commands.
This is meant for the HPI module wherein responses come from EC.
ptrPdStackContext | PDStack library context pointer. |
cmd | Type of command to be initiated. |
ptrCmdBuf | Pointer to the command buffer. |
cmdCbk | Pointer to the callback function. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SendTypecCommand | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_en_pdstack_dpm_typec_cmd_t | cmd, | ||
cy_pdstack_dpm_typec_cmd_cbk_t | cmdCbk | ||
) |
Provides an interface for the application module to send commands to the Type-C connection manager.
ptrPdStackContext | PDStack library context pointer. |
cmd | Type of command to be performed. |
cmdCbk | Pointer to the callback function. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ProtReset | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_en_pd_sop_t | sop | ||
) |
Resets PD protocol layer (transmit and receive) message ID counters for the specified PD packet type.
The message ID will be set to zero on the next PD message transmitted by the EZ-PD(TM) PMG1. Message ID checks will not be performed for the next PD message of this type which is received by the EZ-PD(TM) PMG1.
ptrPdStackContext | PDStack library context pointer. |
sop | Packet type (SOP, SOP', or SOP'') |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ProtResetRx | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_en_pd_sop_t | sop | ||
) |
Resets the PD receive message counter for the specified packet type.
This causes the stack to skip checking for a valid message ID on the next PD message of this type that is received.
ptrPdStackContext | PDStack library context pointer. |
sop | Packet type (SOP, SOP', or SOP'') |
cy_en_pdstack_status_t Cy_PdStack_Dpm_PeStop | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Stops the policy engine.
Used in a fault scenario where-in the USB PD communication needs to be stopped, but the Type-C manager needs to be active to detect detach of the faulty device.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_Pd3SrcRpFlowControl | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | blockSinkAms | ||
) |
Used to specify whether to keep the Rp termination at SinkTxNG or SinkTxOK while acting as a PD 3.0 source.
The PD policy engine has a default source implementation where it changes the Rp to SinkTxNG before sending any PD messages and reverts the Rp to SinkTxOK at the end of the AMS. It can be used to speed up operations when initiating back-to-back AMS-es by preventing the Rp from being changed back to SinkTxOK after each AMS.
ptrPdStackContext | PDStack library context pointer. |
blockSinkAms | If true, Rp will be changed to SinkTxNG; if false, Rp will be changed to SinkTxOK. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsIdle | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | ptrIsIdle | ||
) |
Checks whether the Type-C/PD stack is idle.
ptrPdStackContext | PDStack library context pointer. |
ptrIsIdle | Output parameter contains true if idle, false if any operations are pending on any port. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ClearSolnBusy | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Informs the Type-C/PD stack that the solution state allows Type-C transitions.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetSolnBusy | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Informs the Type-C/PD stack that the solution state does not allow Type-C transitions.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetCf | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | status | ||
) |
Sets/clears the current foldback status.
ptrPdStackContext | PDStack library context pointer. |
status | Current foldback status. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_PpsTask | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Monitors the PPS activity.
It needs to be called periodically when in the PPS mode of operation. Because the VBUS voltage is expected to have stabilized when invoking this function, this is not handled internally and is expected to be triggered from the application layer. The recommended periodicity for this is 100 ms.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsRdoValid | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_pd_pd_do_t | rdo | ||
) |
Evaluates any RDO with respect to the current source cap of the specified context.
ptrPdStackContext | PDStack library context pointer. |
rdo | Requests data object. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateDisCounter | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | clear | ||
) |
Clears the DPM to disable the requests counter.
ptrPdStackContext | PDStack library context pointer. |
clear | True if the port disables request counter needs to be cleared. False if the port disables request counter needs to be incremented. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateUsbComm | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | state | ||
) |
Updates the USB communication capable bit.
ptrPdStackContext | PDStack library context pointer. |
state | New value of the USB communication capable bit. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSnkUsbSusp | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | state | ||
) |
Updates the sink USB suspend enable bit.
ptrPdStackContext | PDStack library context pointer. |
state | New value of the sink USB suspend enable bit. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetBCRFaultStat | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | value | ||
) |
Sets the BCR fault bit status.
ptrPdStackContext | PDStack library context pointer. |
value | Fault bit which needs to be set. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ClearBCRFaultStat | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | value | ||
) |
Clears the BCR fault bit status.
ptrPdStackContext | PDStack library context pointer. |
value | Fault bit which needs to be cleared. |
bool Cy_PdStack_Dpm_GetBistStmEn | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Gets the BIST STM enabled/disabled flag.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetBistStmEn | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | value | ||
) |
Sets the BIST STM enabled/disabled flag.
ptrPdStackContext | PDStack library context pointer. |
value | Value to be set. Set true to enable and false to disable. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateExtSrcCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t * | ptrBuf | ||
) |
Updates the extended source capabilities for the PD port.
ptrPdStackContext | PDStack library context pointer. |
ptrBuf | Pointer to a buffer containing extended source capabilities data. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ClearFaultActive | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Clears the internal fault active flags.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsPrevContractValid | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Checks if the previous contract is valid, the previous contract may become invalid because of runtime update of the source caps.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdatePortConfig | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | role, | ||
uint8_t | dflt_role, | ||
bool | toggle_en, | ||
uint8_t | try_src_snk_en | ||
) |
Allows changing the PD port configuration parameters such as port role, default port role, DRP toggle enable, and Try.Src enable at runtime.
These changes are allowed while the corresponding PD port is disabled.
ptrPdStackContext | PDStack library context pointer. |
role | New port role selection (0 = Sink, 1 = Source, 2 = Dua-role). |
dflt_role | New default port role selection (0 = Sink, 1 = Source). |
toggle_en | New value for DRP toggle enable flag. |
try_src_snk_en | New value for Try.SRC/ TRY.SNK enable flag (0 = Both Try.SRC and TRY.SNK are disabled, 1 = Try.SRC is enabled, 2 = TRY.SNK is enabled). |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateFrsEnable | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | frsRxEn, | ||
bool | frsTxEn | ||
) |
Allows to enable/disable the PD 3.0 FRS functionality.
ptrPdStackContext | PDStack library context pointer. |
frsRxEn | Whether FRS receive is to be enabled. |
frsTxEn | Whether FRS transmit is to be enabled. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ClearHardResetCount | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Clears the hard reset count.
ptrPdStackContext | PDStack library context pointer. |
uint16_t Cy_PdStack_Dpm_GetVbusVoltage | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Uses the application-provided callback to measure the current VBus voltage.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_usb_data_sig_t Cy_PdStack_Dpm_GetCableUsbCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Retrieves the type of USB signaling supported by the Type-C cable in use.
The information is calculated based on the cable VDO responses obtained from the cable marker.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetDelaySrcCapStart | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint16_t | delay | ||
) |
Facilitates delaying the starting of source cap on Type-C attach.
Applicable only when the cable is not present.
ptrPdStackContext | PDStack library context pointer. |
delay | Delay in ms. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetAlert | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_pd_pd_do_t | alert_ado | ||
) |
Sets alert ADO on OCP/OVP fault.
Stack automatically sends an alert after explicit contract when alert ADO is non-zero. After the alert is sent or detach happens; alert ADO will be cleared automatically by the stack.
ptrPdStackContext | PDStack library context pointer. |
alert_ado | Alert augmented data object. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_DowngradePdRev | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Allows downgrading the PD revision.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateExtSnkCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t * | ptrBuf | ||
) |
Allows updating the extended sink capabilities for the PD port.
ptrPdStackContext | PDStack library context pointer. |
ptrBuf | Pointer to a buffer containing extended sink capabilities data. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetFaultActive | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Sets internal flags to indicate that any fault (OVP/OCP/OTP, etc.) is active.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetChunkXferRunning | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_en_pdstack_ams_type_t | amsType | ||
) |
Sets the chunk transfer type.
This should be called after the response of a chunk is received inform the stack that chunked transfer has not been completed.
ptrPdStackContext | PDStack library context pointer. |
amsType | Type of PD atomic message sequence that is running. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SendHardReset | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | reason | ||
) |
Attempts to send USB PD hard reset to port partner.
ptrPdStackContext | PDStack library context pointer. |
reason | Reason for the hard reset. Used for internal status tracking only. |
uint32_t Cy_PdStack_Dpm_GetPdPortStatus | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Returns the PD port status as expected by the embedded controller.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSwapResponse | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | value | ||
) |
Updates the USB PD data role, power role, and vconn swap responses.
ptrPdStackContext | PDStack library context pointer. |
value | New swap response. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdatePpsSrcEn | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | ppsSrcEn | ||
) |
Updates the PD port PPS Source Enable field.
ptrPdStackContext | PDStack library context pointer. |
ppsSrcEn | whether to enable PPS Source or not. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdatePpsSnkEn | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | ppsSnkEn | ||
) |
Updates the PD port PPS Sink Enable field.
ptrPdStackContext | PDStack library context pointer. |
ppsSnkEn | whether to enable PPS Sink or not. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdatePortStatus | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t * | status_p, | ||
uint8_t | offset, | ||
uint8_t | byte_cnt | ||
) |
Updates the PD port status returned in response to a Get_Status command.
ptrPdStackContext | PDStack library context pointer. |
status_p | Pointer to a buffer containing the port status. |
offset | Number of bytes of offset to be applied while updating the status. |
byte_cnt | Number of bytes of status to be updated. |
bool Cy_PdStack_Dpm_RefreshSrcCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Refreshes the source cap at runtime.
ptrPdStackContext | PDStack library context pointer. |
bool Cy_PdStack_Dpm_RefreshSnkCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Refreshes the sink cap at runtime.
ptrPdStackContext | PDStack library context pointer. |
cy_pd_stack_conf_t Cy_PdStack_Dpm_GetStackConfig | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Retrieves the configurable switch values at runtime.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ChangeEprActiveFlag | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | flag | ||
) |
Change the state of the EPR mode active flag.
ptrPdStackContext | PDStack library context pointer. |
flag | Sets/resets the EPR active flag. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsEprModeActive | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | isActive | ||
) |
Checks whether the EPR mode is active.
ptrPdStackContext | PDStack library context pointer. |
isActive | State of the EPR flag. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ChangeEprToSpr | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | flag | ||
) |
Changes the EPR to SPR indicator.
ptrPdStackContext | PDstack library context pointer. |
flag | Sets/resets the EPR flag to limit the PDO index. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsEprSpr | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | isSpr | ||
) |
Checks whether the EPR PDO needs to limit it to SPR.
ptrPdStackContext | PDStack library context pointer. |
isSpr | Contains true if eval PDO needs to limit PDO count to SPR otherwise, false. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsEprAvsModeActive | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool * | isActive | ||
) |
Checks whether the EPR AVS mode is active.
ptrPdStackContext | PDStack library context pointer. |
isActive | State of the EPR flag. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_ChangeEprAvsActiveFlag | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | flag | ||
) |
Change the state of the EPR AVS mode active flag.
ptrPdStackContext | PDStack library context pointer. |
flag | Sets/resets the EPR AVS active flag. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_IsValidAvsReq | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | src_pdo_index, | ||
cy_pd_pd_do_t | rdo | ||
) |
Evaluates the AVS RDO with respect to the selected AVS PDO.
ptrPdStackContext | PDStack library context pointer. |
src_pdo_index | SRC PDO index. |
rdo | Requests data object received from the port partner. |
void Cy_PdStack_Dpm_EprSnkSendKeepAliveCb | ( | cy_timer_id_t | id, |
void * | ptrContext | ||
) |
Callbacks to initiate the Keepalive message.
id | Timer index. |
ptrContext | Callback context. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSnkMaxMin | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | count, | ||
uint16_t * | max_min | ||
) |
Updates the sink max/min current/power at runtime thereby overriding the generated configuration by EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
count | Number of PDOs. |
max_min | Pointer to max/min current/power array. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSnkCapMask | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | mask | ||
) |
Update the sink PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
mask | PDO mask. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSnkCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | count, | ||
cy_pd_pd_do_t * | pdo | ||
) |
Updates the sink PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PSStack library context pointer. |
count | Number of PDOs. |
pdo | Pointer to the PDO array. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSrcCapMask | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | mask | ||
) |
Updates the source PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
mask | PDO mask. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateSrcCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | count, | ||
cy_pd_pd_do_t * | pdo | ||
) |
Update the source PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
count | Number of PDOs. |
pdo | Pointer to the PDO array. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateEprSrcCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | count, | ||
cy_pd_pd_do_t * | pdo | ||
) |
Updates the EPR source PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
count | Number of PDOs. |
pdo | Pointer to the PDO array |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateEprSrcCapMask | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | mask | ||
) |
Update the EPR source PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
mask | PDO mask. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateEprSnkCap | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | count, | ||
cy_pd_pd_do_t * | pdo | ||
) |
Updates the EPR sink PDOs at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
count | Number of PDOs. |
pdo | Pointer to the PDO array. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateEprSnkCapMask | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | mask | ||
) |
Updates the EPR sink PDO mask at runtime thereby overriding the generated configuration by the EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
mask | PDO mask. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateEprSnkMaxMin | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | count, | ||
uint16_t * | max_min | ||
) |
Updates the EPR sink max/min current/power at runtime thereby overriding the generated configuration by EZ-PD(TM) Configurator.
ptrPdStackContext | PDStack library context pointer. |
count | Number of PDOs. |
max_min | Pointer to max/min current/power array. |
bool Cy_PdStack_Dpm_GetAutoVcsEnabled | ( | cy_stc_pdstack_context_t * | ptrPdStackContext | ) |
Checks whether the automatic VConn swap is enabled.
ptrPdStackContext | PDStack library context pointer. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateAutoVcsEnable | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | val | ||
) |
Enables/disables the automatic VConn swap by the PD policy engine.
ptrPdStackContext | PDStack library context pointer. |
val | Whether to enable the automatic VConn swap. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateVconnRetain | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
uint8_t | val | ||
) |
Enables/disables the VConn retain setting.
ptrPdStackContext | PDStack library context pointer. |
val | Whether to enable the VConn retain setting. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_SetDataReset | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
bool | value | ||
) |
Enables/disables the data reset support.
ptrPdStackContext | PDStack library context pointer. |
value | True - Enable data reset support. False - Disable data reset support. |
cy_en_pdstack_status_t Cy_PdStack_Dpm_UpdateTimingParams | ( | cy_stc_pdstack_context_t * | ptrPdStackContext, |
cy_stc_pdstack_pd_timer_params_t * | ptrPdTimerParams | ||
) |
Used to override the default values of the following PDStack timer periods: PD2 sender response timer period PD3 sender response timer period CC debounce timer period Maximum cable discovery count.
The default values for PD2 sender response timer period, PD3 sender response timer period, CC debounce timer period, and error recovery delay is initialized with the following values: CY_PD_2_SENDER_RESPONSE_TIMER_PERIOD CY_PD_3_SENDER_RESPONSE_TIMER_PERIOD CY_PD_TYPEC_CC_DEBOUNCE_TIMER_PERIOD CY_PD_TYPEC_ERROR_RECOVERY_TIMER_PERIOD
ptrPdStackContext | PDStack library context pointer. |
ptrPdTimerParams | Pointer to PD timer structure containing new timer periods to be used. |
cy_stc_pdstack_context_t* Cy_PdStack_Dpm_GetContext | ( | uint8_t | port | ) |
This API returns the pointer to the cy_stc_pdstack_context_t of the given port.
This API should be called after Cy_PdStack_Dpm_Init () has been called.
port | The selected port. |