Functions | |
| cy_en_usbpd_status_t | Cy_USBPD_Phy_Init (cy_stc_usbpd_context_t *context, cy_cb_usbpd_phy_handle_events_t phyCbk) |
| Initializes the PD phy registers and registers a callback (provided by the PD protocol state machine of the PDSTACK Middleware) which will be called when interrupts associated with the PD transceiver are received. More... | |
| void | Cy_USBPD_Phy_RefreshRoles (cy_stc_usbpd_context_t *context) |
| Configures the PD phy based on the current power role, data role and contract status of the specified port. More... | |
| bool | Cy_USBPD_Phy_LoadMsg (cy_stc_usbpd_context_t *context, cy_en_pd_sop_t sop, uint8_t retries, uint8_t dobjCount, uint32_t header, bool unchunked, uint32_t *buf) |
| Loads the PD message in FIFO and configures the necessary registers in preparation to sending the message out. More... | |
| void | Cy_USBPD_Phy_Reset_RxTx_SM (cy_stc_usbpd_context_t *context) |
| Reset the PD receive and transmit state machines. More... | |
| bool | Cy_USBPD_Phy_SendMsg (cy_stc_usbpd_context_t *context) |
| Starts the transmission of a PD message already loaded in FIFO. More... | |
| cy_en_usbpd_status_t | Cy_USBPD_Phy_SendBIST_Cm2 (cy_stc_usbpd_context_t *context) |
| Starts transmission of BIST Carrier Mode 2. More... | |
| cy_en_usbpd_status_t | Cy_USBPD_Phy_AbortBIST_Cm2 (cy_stc_usbpd_context_t *context) |
| Stops transmission of BIST Carrier Mode 2 pattern. More... | |
| cy_en_usbpd_status_t | Cy_USBPD_Phy_AbortTxMsg (cy_stc_usbpd_context_t *context) |
| Stops transmission of any ongoing PD message. More... | |
| cy_en_usbpd_status_t | Cy_USBPD_Phy_SendReset (cy_stc_usbpd_context_t *context, cy_en_pd_sop_t sop) |
| Starts transmission of a cable reset or a hard reset as requested. More... | |
| void | Cy_USBPD_Intr0RxTxHandler (cy_stc_usbpd_context_t *context) |
| Interrupt Handler function for USBPD Transceiver interrupts. More... | |
| cy_stc_pd_packet_extd_t * | Cy_USBPD_Phy_GetRxPacket (cy_stc_usbpd_context_t *context) |
| Returns the received packet. More... | |
| void | Cy_USBPD_Intr0Handler (cy_stc_usbpd_context_t *context) |
| Interrupt Handler function for USBPD Transceiver and HPD interrupts. More... | |
| bool | Cy_USBPD_Phy_IsBusy (cy_stc_usbpd_context_t *context) |
| Checks if the PD Phy is busy for the specified port based on passed context. More... | |
| void | Cy_USBPD_Phy_EnRx (cy_stc_usbpd_context_t *context) |
| Enables the Phy Receiver. More... | |
| void | Cy_USBPD_Phy_DisRx (cy_stc_usbpd_context_t *context, uint8_t hardResetEn) |
| Disables the Phy Receiver. More... | |
| void | Cy_USBPD_Phy_EnUnchunkedTx (cy_stc_usbpd_context_t *context) |
| Enables the Phy to transmit Unchunked messages. More... | |
| void | Cy_USBPD_Phy_DisUnchunkedTx (cy_stc_usbpd_context_t *context) |
| Disables the Phy to transmit Unchunked messages. More... | |
| void | Cy_USBPD_Phy_DisRxTx (cy_stc_usbpd_context_t *context) |
| Disables the PD receive and transmit PHY. More... | |
| cy_en_usbpd_status_t Cy_USBPD_Phy_Init | ( | cy_stc_usbpd_context_t * | context, |
| cy_cb_usbpd_phy_handle_events_t | phyCbk | ||
| ) |
Initializes the PD phy registers and registers a callback (provided by the PD protocol state machine of the PDSTACK Middleware) which will be called when interrupts associated with the PD transceiver are received.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| phyCbk | The phy event handler callback. |
| void Cy_USBPD_Phy_RefreshRoles | ( | cy_stc_usbpd_context_t * | context | ) |
Configures the PD phy based on the current power role, data role and contract status of the specified port.
This API does not enable the receiver.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| bool Cy_USBPD_Phy_LoadMsg | ( | cy_stc_usbpd_context_t * | context, |
| cy_en_pd_sop_t | sop, | ||
| uint8_t | retries, | ||
| uint8_t | dobjCount, | ||
| uint32_t | header, | ||
| bool | unchunked, | ||
| uint32_t * | buf | ||
| ) |
Loads the PD message in FIFO and configures the necessary registers in preparation to sending the message out.
The actual message sending has to be triggered by calling Cy_USBPD_Phy_SendMsg().
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| sop | SOP Type. |
| retries | Number of retries. |
| dobjCount | No of data objects(each 32 bit) in data. |
| header | PD Header in lower 16 bits and optional unchunked extended header in upper 16 bits. |
| unchunked | Unchunked message if true. |
| buf | Pointer to message. Message buffer is a DWORD array that holds the data associated with data and extended data messages. |
| void Cy_USBPD_Phy_Reset_RxTx_SM | ( | cy_stc_usbpd_context_t * | context | ) |
Reset the PD receive and transmit state machines.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| bool Cy_USBPD_Phy_SendMsg | ( | cy_stc_usbpd_context_t * | context | ) |
Starts the transmission of a PD message already loaded in FIFO.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_usbpd_status_t Cy_USBPD_Phy_SendBIST_Cm2 | ( | cy_stc_usbpd_context_t * | context | ) |
Starts transmission of BIST Carrier Mode 2.
Once this API returns successfully, the PHY continues to send the CM2 pattern until Cy_USBPD_Phy_AbortBIST_Cm2() is called.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_usbpd_status_t Cy_USBPD_Phy_AbortBIST_Cm2 | ( | cy_stc_usbpd_context_t * | context | ) |
Stops transmission of BIST Carrier Mode 2 pattern.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_usbpd_status_t Cy_USBPD_Phy_AbortTxMsg | ( | cy_stc_usbpd_context_t * | context | ) |
Stops transmission of any ongoing PD message.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_usbpd_status_t Cy_USBPD_Phy_SendReset | ( | cy_stc_usbpd_context_t * | context, |
| cy_en_pd_sop_t | sop | ||
| ) |
Starts transmission of a cable reset or a hard reset as requested.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| sop | SOP Type. |
| void Cy_USBPD_Intr0RxTxHandler | ( | cy_stc_usbpd_context_t * | context | ) |
Interrupt Handler function for USBPD Transceiver interrupts.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_stc_pd_packet_extd_t* Cy_USBPD_Phy_GetRxPacket | ( | cy_stc_usbpd_context_t * | context | ) |
Returns the received packet.
Since the interrupt handlers uses the same buffer to receive all incoming messages, the caller of this function needs to copy the data out before a new message is received.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_USBPD_Intr0Handler | ( | cy_stc_usbpd_context_t * | context | ) |
Interrupt Handler function for USBPD Transceiver and HPD interrupts.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| bool Cy_USBPD_Phy_IsBusy | ( | cy_stc_usbpd_context_t * | context | ) |
Checks if the PD Phy is busy for the specified port based on passed context.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_USBPD_Phy_EnRx | ( | cy_stc_usbpd_context_t * | context | ) |
Enables the Phy Receiver.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_USBPD_Phy_DisRx | ( | cy_stc_usbpd_context_t * | context, |
| uint8_t | hardResetEn | ||
| ) |
Disables the Phy Receiver.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| hardResetEn | Receiver completely disabled if 0, Hard Reset can be received if set to 1. |
| void Cy_USBPD_Phy_EnUnchunkedTx | ( | cy_stc_usbpd_context_t * | context | ) |
Enables the Phy to transmit Unchunked messages.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_USBPD_Phy_DisUnchunkedTx | ( | cy_stc_usbpd_context_t * | context | ) |
Disables the Phy to transmit Unchunked messages.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_USBPD_Phy_DisRxTx | ( | cy_stc_usbpd_context_t * | context | ) |
Disables the PD receive and transmit PHY.
| context | The pointer to the context structure cy_stc_usbpd_context_t allocated by the user. The structure is used during the USBPD operation for internal configuration and data retention. The user must not modify anything in this structure. |