The functions provide a set of APIs to handle battery charging operations. More...
Functions | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_Init (cy_stc_usbpd_context_t *context, cy_cb_bc_phy_events_t bcPhyCbk) |
This function initializes the charger detect block and registers a callback function with the charger detect PHY layer. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_En (cy_stc_usbpd_context_t *context) |
This function enables the charging block hardware. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_Dis (cy_stc_usbpd_context_t *context) |
This function disables the charging block hardware in the USB-PD IP. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_ConfigSrcTerm (cy_stc_usbpd_context_t *context, cy_en_usbpd_bch_src_term_t chargerTerm) |
This function applies the desired source terminations on D+/D- lines. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_ConfigSnkTerm (cy_stc_usbpd_context_t *context, cy_en_usbpd_bch_snk_term_t chargerTerm) |
This function applies the desired sink terminations on D+/D- lines. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_RemoveTerm (cy_stc_usbpd_context_t *context) |
This function removes all terminations/voltage sources from D+/D- lines. More... | |
bool | Cy_USBPD_Bch_Phy_Config_Comp (cy_stc_usbpd_context_t *context, uint8_t compIdx, cy_en_usbpd_bch_comp_pinput_t pInput, cy_en_usbpd_bch_comp_ninput_t mInput, cy_en_usbpd_bch_vref_t vref, cy_en_usbpd_bch_comp_edge_t edge) |
This function configures and enables one of the charger detect comparators. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_DisableComp (cy_stc_usbpd_context_t *context, uint8_t compIdx) |
This function disables one of the charger detect comparators. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_Phy_Isolate_DpDm (cy_stc_usbpd_context_t *context) |
This function isolates the charge detect block from D+/D- lines. More... | |
bool | Cy_USBPD_Bch_Phy_CompResult (cy_stc_usbpd_context_t *context, uint8_t compIdx) |
This function checks and returns the comparator output. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_ApplyDpPd (cy_stc_usbpd_context_t *context) |
This function applies pulldown on D+. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_RemoveDpPd (cy_stc_usbpd_context_t *context) |
This function removes pulldown on D+. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_ApplyDmPd (cy_stc_usbpd_context_t *context) |
This function applies pulldown on D-. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_RemoveDmPd (cy_stc_usbpd_context_t *context) |
This function removes pulldown on D-. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_ApplyDpPu (cy_stc_usbpd_context_t *context) |
This function applies pullup on D+. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_RemoveDpPu (cy_stc_usbpd_context_t *context) |
This function removes pullup on D+. More... | |
void | Cy_USBPD_Bch_ApplyRdatLkgDp (cy_stc_usbpd_context_t *context) |
This function applies RDAT_LKG resistance on D+. More... | |
void | Cy_USBPD_Bch_ApplyRdatLkgDm (cy_stc_usbpd_context_t *context) |
This function applies RDAT_LKG resistance on D-. More... | |
void | Cy_USBPD_Bch_RemoveRdatLkgDp (cy_stc_usbpd_context_t *context) |
This function removes RDAT_LKG resistance on D+. More... | |
void | Cy_USBPD_Bch_RemoveRdatLkgDm (cy_stc_usbpd_context_t *context) |
This function removes RDAT_LKG resistance on D-. More... | |
void | Cy_USBPD_Bch_Apply_AppleTermDp (cy_stc_usbpd_context_t *context, cy_en_usbpd_bch_src_term_t appleTermId) |
This function applies Apple source terminations on D+. More... | |
void | Cy_USBPD_Bch_Apply_AppleTermDm (cy_stc_usbpd_context_t *context, cy_en_usbpd_bch_src_term_t appleTermId) |
This function applies Apple source terminations on D-. More... | |
void | Cy_USBPD_Bch_Apply_VdmSrc (cy_stc_usbpd_context_t *context) |
This function applies VDM_SRC on DM. More... | |
void | Cy_USBPD_Bch_Remove_VdmSrc (cy_stc_usbpd_context_t *context) |
This function removes VDM_SRC on DM. More... | |
bool | Cy_USBPD_Bch_Is_VdmSrc_On (cy_stc_usbpd_context_t *context) |
Function to check whether VDM_SRC supply is enabled. More... | |
void | Cy_USBPD_Bch_Remove_AppleSrcDp (cy_stc_usbpd_context_t *context) |
This function removes Apple source terminations from D+. More... | |
void | Cy_USBPD_Bch_Remove_AppleSrcDm (cy_stc_usbpd_context_t *context) |
This function removes Apple source terminations from D-. More... | |
void | Cy_USBPD_Bch_Enable_AppleDet (cy_stc_usbpd_context_t *context) |
This function enables Apple Brick ID detection. More... | |
void | Cy_USBPD_Bch_Disable_AppleDet (cy_stc_usbpd_context_t *context) |
This function disables Apple Brick ID detection. More... | |
bool | Cy_USBPD_Bch_Phy_DpStat (cy_stc_usbpd_context_t *context) |
This function checks status of DP line. More... | |
bool | Cy_USBPD_Bch_Phy_DmStat (cy_stc_usbpd_context_t *context) |
This function checks status of DM line. More... | |
void | Cy_USBPD_Bch_Phy_Config_DeepSleep (cy_stc_usbpd_context_t *context) |
This function configures the charger detect block for deepsleep entry. More... | |
void | Cy_USBPD_Bch_Phy_Config_Wakeup (cy_stc_usbpd_context_t *context) |
This function configures the charger detect block after deepsleep exit. More... | |
void | Cy_USBPD_Bch_Intr1Handler (cy_stc_usbpd_context_t *context) |
This function handles the Battery Charging interrupts. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_QcSrcInit (cy_stc_usbpd_context_t *context) |
This function initialize QC source block. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_QcSrcStop (cy_stc_usbpd_context_t *context) |
This function deselect the QC source block. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_QcSrcMasterSenseEn (cy_stc_usbpd_context_t *context) |
This function enable master for hardware to start sensing the pulses on Dplus and Dminus. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_QcSrcMasterSenseDis (cy_stc_usbpd_context_t *context) |
This function disable master for hardware to stop sensing the pulses on Dplus and Dminus. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_QcSrcContModeStart (cy_stc_usbpd_context_t *context) |
This function configures the QC3 block, enable QC interrupts and enables master for DP and DM sensing. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_QcSrcContModeStop (cy_stc_usbpd_context_t *context) |
This function disables QC3 block and interrupts, and also disables the DP/DM master sensing. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSrcInit (cy_stc_usbpd_context_t *context) |
This function enables the AFC source clock, filters and other configurations. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSrcStart (cy_stc_usbpd_context_t *context) |
This function starts the AFC source state machine operations. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSrcStop (cy_stc_usbpd_context_t *context) |
This function stops the AFC source state machine operations. More... | |
void | Cy_USBPD_Bch_Afc_Set_Tx_Data (cy_stc_usbpd_context_t *context, uint8_t *dataPtr, uint8_t count) |
This function transmits AFC (Adaptive Fast Charging) data buffer provided. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSinkInit (cy_stc_usbpd_context_t *context) |
This function initialize the AFC (Adaptive Fast Charging) clock, filters and enables block for sink operations. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSinkStartPing (cy_stc_usbpd_context_t *context) |
This function sends a ping request to AFC (Adaptive Fast Charging) source. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSinkStart (cy_stc_usbpd_context_t *context) |
This function configures the AFC (Adaptive Fast Charging) state machine, interrupts and stats the AFC sink operations. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Bch_AfcSinkStop (cy_stc_usbpd_context_t *context) |
This function disables all AFC (Adaptive Fast Charging) interrupt. More... | |
uint8_t * | Cy_USBPD_Bch_AfcGetRxDataPtr (cy_stc_usbpd_context_t *context) |
This function returns the AFC (Adaptive Fast Charging) received data pointer. More... | |
uint8_t | Cy_USBPD_Bch_AfcGetRxDataCount (cy_stc_usbpd_context_t *context) |
This function returns the AFC(Adaptive Fast Charging) received data count. More... | |
void | Cy_USBPD_Bch_AfcLoadTxData (cy_stc_usbpd_context_t *context) |
This function load the USBPD context AFC (Adaptive Fast Charging) tx data into AFC ping pong buffer. More... | |
void | Cy_USBPD_Bch_QC3_IntrHandler (cy_stc_usbpd_context_t *context) |
This function handles the QC3 interrupts. More... | |
void | Cy_USBPD_Bch_AfcPingPong_IntrHandler (cy_stc_usbpd_context_t *context) |
This function handles the AFC ping pong interrupts and copies data into context buffer. More... | |
void | Cy_USBPD_Bch_AfcIdle_IntrHandler (cy_stc_usbpd_context_t *context) |
This function handles the AFC idle interrupt. More... | |
void | Cy_USBPD_Bch_AfcReset_IntrHandler (cy_stc_usbpd_context_t *context) |
This function handles the AFC reset interrupt. More... | |
void | Cy_USBPD_Bch_Intr0Handler (cy_stc_usbpd_context_t *context) |
This function handles the Battery Charging interrupts related to AFC and QC. More... | |
__STATIC_INLINE int | Cy_USBPD_Bch_Get_QcPulseCount (cy_stc_usbpd_context_t *context) |
This function returns the QC3 pulse count stored in the context variable. More... | |
__STATIC_INLINE void | Cy_USBPD_Bch_Update_QcPulseCount (cy_stc_usbpd_context_t *context, int new_count) |
This function update the QC3 pulse count in the context variable. More... | |
__STATIC_INLINE uint8_t * | Cy_USBPD_Bch_Get_AfcDataPtr (cy_stc_usbpd_context_t *context) |
This function returns the USBPD context AFC received data pointer. More... | |
__STATIC_INLINE uint8_t | Cy_USBPD_Bch_Get_AfcDataCount (cy_stc_usbpd_context_t *context) |
This function returns the USBPD context AFC received data count. More... | |
The functions provide a set of APIs to handle battery charging operations.
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_Init | ( | cy_stc_usbpd_context_t * | context, |
cy_cb_bc_phy_events_t | bcPhyCbk | ||
) |
This function initializes the charger detect block and registers a callback function with the charger detect PHY layer.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
bcPhyCbk | Battery Charging Event Callback function pointer. Must be non-NULL. |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_En | ( | cy_stc_usbpd_context_t * | context | ) |
This function enables the charging block hardware.
The Cy_USBPD_Bch_Phy_Init function should previously have been called to initialize the block.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_Dis | ( | cy_stc_usbpd_context_t * | context | ) |
This function disables the charging block hardware in the USB-PD IP.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_ConfigSrcTerm | ( | cy_stc_usbpd_context_t * | context, |
cy_en_usbpd_bch_src_term_t | chargerTerm | ||
) |
This function applies the desired source terminations on D+/D- lines.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
chargerTerm | Charger Terminations as per the required protocol |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_ConfigSnkTerm | ( | cy_stc_usbpd_context_t * | context, |
cy_en_usbpd_bch_snk_term_t | chargerTerm | ||
) |
This function applies the desired sink terminations on D+/D- lines.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
chargerTerm | Sink Terminations to be applied. |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_RemoveTerm | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes all terminations/voltage sources from D+/D- lines.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
bool Cy_USBPD_Bch_Phy_Config_Comp | ( | cy_stc_usbpd_context_t * | context, |
uint8_t | compIdx, | ||
cy_en_usbpd_bch_comp_pinput_t | pInput, | ||
cy_en_usbpd_bch_comp_ninput_t | mInput, | ||
cy_en_usbpd_bch_vref_t | vref, | ||
cy_en_usbpd_bch_comp_edge_t | edge | ||
) |
This function configures and enables one of the charger detect comparators.
This can be used for a quick comparator state check or to configure the PHY to provide an interrupt callback when the comparator state changes
context | Pointer to the context structure cy_stc_usbpd_context_t. |
compIdx | Comparator index(0 or 1). |
pInput | Positive input signal selection |
mInput | Negative input signal selection |
vref | Vref value to be used when either input selection is vref. |
edge | Edge selection. If edge is selected, then callback registered in Cy_USBPD_Bch_Phy_Init will be called when event fires. If edge is no interrupt, then this function will revert the comparator to its previous settings after comparison is done. |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_DisableComp | ( | cy_stc_usbpd_context_t * | context, |
uint8_t | compIdx | ||
) |
This function disables one of the charger detect comparators.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
compIdx | Comparator index. |
cy_en_usbpd_status_t Cy_USBPD_Bch_Phy_Isolate_DpDm | ( | cy_stc_usbpd_context_t * | context | ) |
This function isolates the charge detect block from D+/D- lines.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
bool Cy_USBPD_Bch_Phy_CompResult | ( | cy_stc_usbpd_context_t * | context, |
uint8_t | compIdx | ||
) |
This function checks and returns the comparator output.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
compIdx | Comparator index. |
cy_en_usbpd_status_t Cy_USBPD_Bch_ApplyDpPd | ( | cy_stc_usbpd_context_t * | context | ) |
This function applies pulldown on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_RemoveDpPd | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes pulldown on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_ApplyDmPd | ( | cy_stc_usbpd_context_t * | context | ) |
This function applies pulldown on D-.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_RemoveDmPd | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes pulldown on D-.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_ApplyDpPu | ( | cy_stc_usbpd_context_t * | context | ) |
This function applies pullup on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_RemoveDpPu | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes pullup on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_ApplyRdatLkgDp | ( | cy_stc_usbpd_context_t * | context | ) |
This function applies RDAT_LKG resistance on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_ApplyRdatLkgDm | ( | cy_stc_usbpd_context_t * | context | ) |
This function applies RDAT_LKG resistance on D-.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_RemoveRdatLkgDp | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes RDAT_LKG resistance on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_RemoveRdatLkgDm | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes RDAT_LKG resistance on D-.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Apply_AppleTermDp | ( | cy_stc_usbpd_context_t * | context, |
cy_en_usbpd_bch_src_term_t | appleTermId | ||
) |
This function applies Apple source terminations on D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
appleTermId | Apple termination ID |
void Cy_USBPD_Bch_Apply_AppleTermDm | ( | cy_stc_usbpd_context_t * | context, |
cy_en_usbpd_bch_src_term_t | appleTermId | ||
) |
This function applies Apple source terminations on D-.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
appleTermId | Apple termination ID |
void Cy_USBPD_Bch_Apply_VdmSrc | ( | cy_stc_usbpd_context_t * | context | ) |
This function applies VDM_SRC on DM.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Remove_VdmSrc | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes VDM_SRC on DM.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
bool Cy_USBPD_Bch_Is_VdmSrc_On | ( | cy_stc_usbpd_context_t * | context | ) |
Function to check whether VDM_SRC supply is enabled.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Remove_AppleSrcDp | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes Apple source terminations from D+.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Remove_AppleSrcDm | ( | cy_stc_usbpd_context_t * | context | ) |
This function removes Apple source terminations from D-.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Enable_AppleDet | ( | cy_stc_usbpd_context_t * | context | ) |
This function enables Apple Brick ID detection.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Disable_AppleDet | ( | cy_stc_usbpd_context_t * | context | ) |
This function disables Apple Brick ID detection.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
bool Cy_USBPD_Bch_Phy_DpStat | ( | cy_stc_usbpd_context_t * | context | ) |
This function checks status of DP line.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
bool Cy_USBPD_Bch_Phy_DmStat | ( | cy_stc_usbpd_context_t * | context | ) |
This function checks status of DM line.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Phy_Config_DeepSleep | ( | cy_stc_usbpd_context_t * | context | ) |
This function configures the charger detect block for deepsleep entry.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Phy_Config_Wakeup | ( | cy_stc_usbpd_context_t * | context | ) |
This function configures the charger detect block after deepsleep exit.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Intr1Handler | ( | cy_stc_usbpd_context_t * | context | ) |
This function handles the Battery Charging interrupts.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_QcSrcInit | ( | cy_stc_usbpd_context_t * | context | ) |
This function initialize QC source block.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_QcSrcStop | ( | cy_stc_usbpd_context_t * | context | ) |
This function deselect the QC source block.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_QcSrcMasterSenseEn | ( | cy_stc_usbpd_context_t * | context | ) |
This function enable master for hardware to start sensing the pulses on Dplus and Dminus.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_QcSrcMasterSenseDis | ( | cy_stc_usbpd_context_t * | context | ) |
This function disable master for hardware to stop sensing the pulses on Dplus and Dminus.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_QcSrcContModeStart | ( | cy_stc_usbpd_context_t * | context | ) |
This function configures the QC3 block, enable QC interrupts and enables master for DP and DM sensing.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_QcSrcContModeStop | ( | cy_stc_usbpd_context_t * | context | ) |
This function disables QC3 block and interrupts, and also disables the DP/DM master sensing.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSrcInit | ( | cy_stc_usbpd_context_t * | context | ) |
This function enables the AFC source clock, filters and other configurations.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSrcStart | ( | cy_stc_usbpd_context_t * | context | ) |
This function starts the AFC source state machine operations.
Cy_USBPD_Bch_AfcSrcInit function must be called before this function call.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSrcStop | ( | cy_stc_usbpd_context_t * | context | ) |
This function stops the AFC source state machine operations.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Afc_Set_Tx_Data | ( | cy_stc_usbpd_context_t * | context, |
uint8_t * | dataPtr, | ||
uint8_t | count | ||
) |
This function transmits AFC (Adaptive Fast Charging) data buffer provided.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
dataPtr | Transmit data buffer pointer |
count | Transmit data count |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSinkInit | ( | cy_stc_usbpd_context_t * | context | ) |
This function initialize the AFC (Adaptive Fast Charging) clock, filters and enables block for sink operations.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSinkStartPing | ( | cy_stc_usbpd_context_t * | context | ) |
This function sends a ping request to AFC (Adaptive Fast Charging) source.
operations.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSinkStart | ( | cy_stc_usbpd_context_t * | context | ) |
This function configures the AFC (Adaptive Fast Charging) state machine, interrupts and stats the AFC sink operations.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
cy_en_usbpd_status_t Cy_USBPD_Bch_AfcSinkStop | ( | cy_stc_usbpd_context_t * | context | ) |
This function disables all AFC (Adaptive Fast Charging) interrupt.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
uint8_t* Cy_USBPD_Bch_AfcGetRxDataPtr | ( | cy_stc_usbpd_context_t * | context | ) |
This function returns the AFC (Adaptive Fast Charging) received data pointer.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
uint8_t Cy_USBPD_Bch_AfcGetRxDataCount | ( | cy_stc_usbpd_context_t * | context | ) |
This function returns the AFC(Adaptive Fast Charging) received data count.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_AfcLoadTxData | ( | cy_stc_usbpd_context_t * | context | ) |
This function load the USBPD context AFC (Adaptive Fast Charging) tx data into AFC ping pong buffer.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_QC3_IntrHandler | ( | cy_stc_usbpd_context_t * | context | ) |
This function handles the QC3 interrupts.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_AfcPingPong_IntrHandler | ( | cy_stc_usbpd_context_t * | context | ) |
This function handles the AFC ping pong interrupts and copies data into context buffer.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_AfcIdle_IntrHandler | ( | cy_stc_usbpd_context_t * | context | ) |
This function handles the AFC idle interrupt.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_AfcReset_IntrHandler | ( | cy_stc_usbpd_context_t * | context | ) |
This function handles the AFC reset interrupt.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
void Cy_USBPD_Bch_Intr0Handler | ( | cy_stc_usbpd_context_t * | context | ) |
This function handles the Battery Charging interrupts related to AFC and QC.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
__STATIC_INLINE int Cy_USBPD_Bch_Get_QcPulseCount | ( | cy_stc_usbpd_context_t * | context | ) |
This function returns the QC3 pulse count stored in the context variable.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
__STATIC_INLINE void Cy_USBPD_Bch_Update_QcPulseCount | ( | cy_stc_usbpd_context_t * | context, |
int | new_count | ||
) |
This function update the QC3 pulse count in the context variable.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
new_count | New QC3 pulse count received |
__STATIC_INLINE uint8_t* Cy_USBPD_Bch_Get_AfcDataPtr | ( | cy_stc_usbpd_context_t * | context | ) |
This function returns the USBPD context AFC received data pointer.
context | Pointer to the context structure cy_stc_usbpd_context_t. |
__STATIC_INLINE uint8_t Cy_USBPD_Bch_Get_AfcDataCount | ( | cy_stc_usbpd_context_t * | context | ) |
This function returns the USBPD context AFC received data count.
context | Pointer to the context structure cy_stc_usbpd_context_t. |