Functions | |
cy_en_usbpd_status_t | Cy_USBPD_Hpd_ReceiveInit (cy_stc_usbpd_context_t *context, cy_cb_usbpd_hpd_events_t cbk) |
Enables the HPD-Receive functionality for the specified PD port based on passed context. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Hpd_TransmitInit (cy_stc_usbpd_context_t *context, cy_cb_usbpd_hpd_events_t cbk) |
Enables the HPD-Transmit functionality for the specified PD port. More... | |
void | Cy_USBPD_Hpd_SleepEntry (cy_stc_usbpd_context_t *context) |
Prepares the HPD transmit block for deep-sleep. More... | |
void | Cy_USBPD_Hpd_Wakeup (cy_stc_usbpd_context_t *context, bool value) |
Restores the HPD Tx signal driver after device wakes up from deep-sleep. More... | |
bool | Cy_USBPD_Hpd_ReceiveGetStatus (cy_stc_usbpd_context_t *context) |
This function is used to fetch the current state of the signal if the HPD receive block is turned ON. More... | |
void | Cy_USBPD_Hpd_RxSleepEntry (cy_stc_usbpd_context_t *context, bool hpdState) |
Prepares the HPD RX block for deep-sleep. More... | |
void | Cy_USBPD_Hpd_RxWakeup (cy_stc_usbpd_context_t *context) |
Restores the HPD Tx signal driver after device wakes up from deep-sleep. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Hpd_Deinit (cy_stc_usbpd_context_t *context) |
Disable the HPD functionality on the specified PD port. More... | |
bool | Cy_USBPD_Hpdt_IsCommandActive (cy_stc_usbpd_context_t *context) |
Checks whether the CtrlReg Command is already started. More... | |
cy_en_usbpd_status_t | Cy_USBPD_Hpd_TransmitSendevt (cy_stc_usbpd_context_t *context, cy_en_usbpd_hpd_events_t evtype) |
Sends the desired HPD event out through the HPD GPIO. More... | |
void | Cy_USBPD_Hpd_Intr0Handler (cy_stc_usbpd_context_t *context) |
HPD Interrupt handler. More... | |
void | Cy_USBPD_Hpd_Intr1Handler (cy_stc_usbpd_context_t *context) |
HPD Interrupt handler. More... | |
cy_en_usbpd_status_t Cy_USBPD_Hpd_ReceiveInit | ( | cy_stc_usbpd_context_t * | context, |
cy_cb_usbpd_hpd_events_t | cbk | ||
) |
Enables the HPD-Receive functionality for the specified PD port based on passed context.
This function shall be used in DP Sink designs and should not be combined with the Cy_USBPD_Hpd_TransmitInit call.
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. |
cbk | Callback function to be called when there is an HPD event. |
cy_en_usbpd_status_t Cy_USBPD_Hpd_TransmitInit | ( | cy_stc_usbpd_context_t * | context, |
cy_cb_usbpd_hpd_events_t | cbk | ||
) |
Enables the HPD-Transmit functionality for the specified PD port.
This function shall be used in DP source designs and should not be combined with the Cy_USBPD_Hpd_ReceiveInit call.
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. |
cbk | Callback function to be used for command completion event. |
void Cy_USBPD_Hpd_SleepEntry | ( | cy_stc_usbpd_context_t * | context | ) |
Prepares the HPD transmit block for deep-sleep.
This function changes the IO mode of the HPD signal to GPIO, so as to avoid glitches on the signal during the active - sleep - active power mode transitions of the device.
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_Hpd_Wakeup | ( | cy_stc_usbpd_context_t * | context, |
bool | value | ||
) |
Restores the HPD Tx signal driver after device wakes up from deep-sleep.
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. |
value | Startup value for the HPD signal. The APP layer is expected to identify the desired (PLUG/UNPLUG) state of the signal and pass it to the PDL. |
bool Cy_USBPD_Hpd_ReceiveGetStatus | ( | cy_stc_usbpd_context_t * | context | ) |
This function is used to fetch the current state of the signal if the HPD receive block is turned ON.
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_Hpd_RxSleepEntry | ( | cy_stc_usbpd_context_t * | context, |
bool | hpdState | ||
) |
Prepares the HPD RX block for deep-sleep.
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. |
hpdState | Connection status of HPD. |
void Cy_USBPD_Hpd_RxWakeup | ( | cy_stc_usbpd_context_t * | context | ) |
Restores the HPD Tx signal driver after device wakes up from deep-sleep.
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_Hpd_Deinit | ( | cy_stc_usbpd_context_t * | context | ) |
Disable the HPD functionality on the specified PD port.
This is used for HPD receive as well transmit de-initialization.
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_Hpdt_IsCommandActive | ( | cy_stc_usbpd_context_t * | context | ) |
Checks whether the CtrlReg Command is already started.
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_Hpd_TransmitSendevt | ( | cy_stc_usbpd_context_t * | context, |
cy_en_usbpd_hpd_events_t | evtype | ||
) |
Sends the desired HPD event out through the HPD GPIO.
Only the CY_USBPD_HPD_EVENT_UNPLUG, CY_USBPD_HPD_EVENT_UNPLUG and CY_USBPD_HPD_EVENT_IRQ events should be 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. |
evtype | Type of HPD event to be sent. |
void Cy_USBPD_Hpd_Intr0Handler | ( | cy_stc_usbpd_context_t * | context | ) |
HPD Interrupt handler.
Expected to be called from PD Interrupt 0 handler.
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_Hpd_Intr1Handler | ( | cy_stc_usbpd_context_t * | context | ) |
HPD Interrupt handler.
Expected to be called from PD Interrupt 1 handler.
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. |