Functions | |
cy_en_tdm_status_t | Cy_AudioTDM_Init (TDM_STRUCT_Type *base, cy_stc_tdm_config_t const *config) |
Initializes the TDM module in accordance with a configuration structure. More... | |
void | Cy_AudioTDM_DeInit (TDM_STRUCT_Type *base) |
Deinitialize the TDM block. More... | |
__STATIC_INLINE void | Cy_AudioTDM_EnableTx (TDM_TX_STRUCT_Type *base) |
Starts an I2S/TDM transmission. More... | |
__STATIC_INLINE void | Cy_AudioTDM_DisableTx (TDM_TX_STRUCT_Type *base) |
Stops an I2S/TDM transmission. More... | |
__STATIC_INLINE void | Cy_AudioTDM_EnableRx (TDM_RX_STRUCT_Type *base) |
Starts an I2S/TDM transmission. More... | |
__STATIC_INLINE void | Cy_AudioTDM_DisableRx (TDM_RX_STRUCT_Type *base) |
Stops an I2S/TDM transmission. More... | |
__STATIC_INLINE void | Cy_AudioTDM_WriteTxData (TDM_TX_STRUCT_Type *base, uint32_t data) |
Writes data to the TX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_FreezeTxFifo (TDM_TX_STRUCT_Type *base) |
Freezes the TX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_UnfreezeTxFifo (TDM_TX_STRUCT_Type *base) |
Unfreezes the TX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_MuteTxFifo (TDM_TX_STRUCT_Type *base) |
Mutes the TX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ActivateTx (TDM_TX_STRUCT_Type *base) |
Activate/start the TX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_DeActivateTx (TDM_TX_STRUCT_Type *base) |
Stop the TX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ReplayTxFifo (TDM_TX_STRUCT_Type *base) |
Replay functionality (used when FREEZE is '1' or in case of a FIFO underflow event). More... | |
__STATIC_INLINE uint8_t | Cy_AudioTDM_GetNumInTxFifo (TDM_TX_STRUCT_Type *base) |
Gets the number of used words in the TX FIFO., Number of used/occupied entries in the TX FIFO. More... | |
__STATIC_INLINE uint8_t | Cy_AudioTDM_GetTxReadPointer (TDM_TX_STRUCT_Type *base) |
Get the TX FIFO Read Pointer. More... | |
__STATIC_INLINE uint8_t | Cy_AudioTDM_GetTxWritePointer (TDM_TX_STRUCT_Type *base) |
Get the TX FIFO Write Pointer. More... | |
__STATIC_INLINE void | Cy_AudioTDM_EnableTxTestMode (TDM_TX_STRUCT_Type *base) |
Enables the test mode. More... | |
__STATIC_INLINE void | Cy_AudioTDM_DisableTxTestMode (TDM_TX_STRUCT_Type *base) |
Disables Test mode. More... | |
__STATIC_INLINE uint32_t | Cy_AudioTDM_ReadRxData (TDM_RX_STRUCT_Type *base) |
Read Rx data from the Rx FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_FreezeRxFifo (TDM_RX_STRUCT_Type *base) |
Freeze RX FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_UnfreezeRxFifo (TDM_RX_STRUCT_Type *base) |
UnFreeze Rx FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ActivateRx (TDM_RX_STRUCT_Type *base) |
Start Rx FIFO. More... | |
__STATIC_INLINE void | Cy_AudioTDM_DeActivateRx (TDM_RX_STRUCT_Type *base) |
Stop Rx FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_AudioTDM_ReadSilentRXFifo (TDM_RX_STRUCT_Type *base) |
When the RX FIFO is empty, a read from this register returns "0". More... | |
__STATIC_INLINE uint8_t | Cy_AudioTDM_GetNumInRxFifo (TDM_RX_STRUCT_Type *base) |
Reads RX FIFO status. More... | |
__STATIC_INLINE uint8_t | Cy_AudioTDM_GetRxReadPointer (TDM_RX_STRUCT_Type *base) |
Reads RX FIFO Read Pointer RX FIFO read pointer: FIFO location from which a data is read. More... | |
__STATIC_INLINE uint8_t | Cy_AudioTDM_GetRxWritePointer (TDM_RX_STRUCT_Type *base) |
Reads RX FIFO Write Pointer RX FIFO write pointer: FIFO location at which a new data is written by the hardware. More... | |
__STATIC_INLINE void | Cy_AudioTDM_EnableRxTestMode (TDM_RX_STRUCT_Type *base) |
Enables Test mode (intended to be used with (master transmitter, slave receiver) configuration). More... | |
__STATIC_INLINE void | Cy_AudioTDM_DisableRxTestMode (TDM_RX_STRUCT_Type *base) |
Disable RX test mode. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ClearTxInterrupt (TDM_TX_STRUCT_Type *base, uint32_t interrupt) |
Clear TX interrupt. More... | |
__STATIC_INLINE void | Cy_AudioTDM_SetTxInterrupt (TDM_TX_STRUCT_Type *base, uint32_t interrupt) |
Set the Tx Interrupt. More... | |
__STATIC_INLINE uint32_t | Cy_AudioTDM_GetTxInterruptMask (TDM_TX_STRUCT_Type *base) |
Get TX interrupt Mask. More... | |
__STATIC_INLINE void | Cy_AudioTDM_SetTxInterruptMask (TDM_TX_STRUCT_Type *base, uint32_t interrupt) |
Set TX interrupt Mask. More... | |
__STATIC_INLINE uint32_t | Cy_AudioTDM_GetTxInterruptStatusMasked (TDM_TX_STRUCT_Type *base) |
Reflects a bitwise AND between the INTR_TX and INTR_TX_MASK registers. More... | |
__STATIC_INLINE void | Cy_AudioTDM_SetTxTriggerInterruptMask (TDM_TX_STRUCT_Type *base) |
Sets TX interrupt Mask. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ClearTxTriggerInterruptMask (TDM_TX_STRUCT_Type *base) |
Clears TX interrupt Mask. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ClearRxInterrupt (TDM_RX_STRUCT_Type *base, uint32_t interrupt) |
Clears RX interrupt. More... | |
__STATIC_INLINE void | Cy_AudioTDM_SetRxInterrupt (TDM_RX_STRUCT_Type *base, uint32_t interrupt) |
Sets RX interrupt. More... | |
__STATIC_INLINE uint32_t | Cy_AudioTDM_GetRxInterruptMask (TDM_RX_STRUCT_Type *base) |
Returns RX interrupt Mask. More... | |
__STATIC_INLINE void | Cy_AudioTDM_SetRxInterruptMask (TDM_RX_STRUCT_Type *base, uint32_t interrupt) |
Sets RX interrupt Mask. More... | |
__STATIC_INLINE uint32_t | Cy_AudioTDM_GetRxInterruptStatusMasked (TDM_RX_STRUCT_Type *base) |
Returns a bitwise AND between the INTR_RX and INTR_RX_MASK registers. More... | |
__STATIC_INLINE void | Cy_AudioTDM_SetRxTriggerInterruptMask (TDM_RX_STRUCT_Type *base) |
Sets Rx Interrupt Mask. More... | |
__STATIC_INLINE void | Cy_AudioTDM_ClearRxTriggerInterruptMask (TDM_RX_STRUCT_Type *base) |
Clear RX interrupt Mask. More... | |
cy_en_tdm_status_t Cy_AudioTDM_Init | ( | TDM_STRUCT_Type * | base, |
cy_stc_tdm_config_t const * | config | ||
) |
Initializes the TDM module in accordance with a configuration structure.
base | The pointer to the TDM instance address. |
config | The pointer to a configuration structure. |
void Cy_AudioTDM_DeInit | ( | TDM_STRUCT_Type * | base | ) |
Deinitialize the TDM block.
base | base |
__STATIC_INLINE void Cy_AudioTDM_EnableTx | ( | TDM_TX_STRUCT_Type * | base | ) |
Starts an I2S/TDM transmission.
Interrupt enabling (by the Cy_AudioTDM_SetTxInterrupt) is required after this function call, in case if any I2S/TDM interrupts are used in the application.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_DisableTx | ( | TDM_TX_STRUCT_Type * | base | ) |
Stops an I2S/TDM transmission.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_EnableRx | ( | TDM_RX_STRUCT_Type * | base | ) |
Starts an I2S/TDM transmission.
Interrupt enabling (by the Cy_AudioTDM_SetRxInterrupt) is required after this function call, in case if any I2S/TDM interrupts are used in the application.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_DisableRx | ( | TDM_RX_STRUCT_Type * | base | ) |
Stops an I2S/TDM transmission.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_WriteTxData | ( | TDM_TX_STRUCT_Type * | base, |
uint32_t | data | ||
) |
Writes data to the TX FIFO.
Increases the TX FIFO level.
base | The pointer to the I2S/TDM instance address. |
data | Data to be written to the TX FIFO. |
__STATIC_INLINE void Cy_AudioTDM_FreezeTxFifo | ( | TDM_TX_STRUCT_Type * | base | ) |
Freezes the TX FIFO.
This function is for debug purposes. HW uses a constant PCM data value of "0" or the previous channel PCM data is replayed. Freeze does not advance the FIFO read pointer (the FIFO data is not used).
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_UnfreezeTxFifo | ( | TDM_TX_STRUCT_Type * | base | ) |
Unfreezes the TX FIFO.
This function is for debug purposes. HW uses TX FIFO data and advances the FIFO read pointer.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_MuteTxFifo | ( | TDM_TX_STRUCT_Type * | base | ) |
Mutes the TX FIFO.
HW uses a constant PCM data value of "0". Mute does advance the FIFO read pointer.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ActivateTx | ( | TDM_TX_STRUCT_Type * | base | ) |
Activate/start the TX FIFO.
This will set the transmitter state to on.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_DeActivateTx | ( | TDM_TX_STRUCT_Type * | base | ) |
Stop the TX FIFO.
This will set the transmitter state to off.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ReplayTxFifo | ( | TDM_TX_STRUCT_Type * | base | ) |
Replay functionality (used when FREEZE is '1' or in case of a FIFO underflow event).
HW uses the previous PCM data value.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint8_t Cy_AudioTDM_GetNumInTxFifo | ( | TDM_TX_STRUCT_Type * | base | ) |
Gets the number of used words in the TX FIFO., Number of used/occupied entries in the TX FIFO.
The field value is in the range [0, 128]. When "0", the FIFO is empty. When "128", the FIFO is full.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint8_t Cy_AudioTDM_GetTxReadPointer | ( | TDM_TX_STRUCT_Type * | base | ) |
Get the TX FIFO Read Pointer.
TX FIFO read pointer: FIFO location from which a data is read. This functionality is intended for debugging purposes.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint8_t Cy_AudioTDM_GetTxWritePointer | ( | TDM_TX_STRUCT_Type * | base | ) |
Get the TX FIFO Write Pointer.
TX FIFO write pointer: FIFO location at which a new data is written by the hardware. This functionality is intended for debugging purposes.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_EnableTxTestMode | ( | TDM_TX_STRUCT_Type * | base | ) |
Enables the test mode.
Used for debugging purposes only. Tx and Rx test modes cannot be enabled simultaneously.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_DisableTxTestMode | ( | TDM_TX_STRUCT_Type * | base | ) |
Disables Test mode.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint32_t Cy_AudioTDM_ReadRxData | ( | TDM_RX_STRUCT_Type * | base | ) |
Read Rx data from the Rx FIFO.
Data (PCM sample) read from the RX FIFO. Reading removes the data from the RX FIFO. Reading from an empty RX FIFO activates FIFO_UNDERFLOW interrupt.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_FreezeRxFifo | ( | TDM_RX_STRUCT_Type * | base | ) |
Freeze RX FIFO.
HW writes from the RX FIFO have no effect: freeze will not advance the FIFO write pointer. This functionality is intended for debugging purposes.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_UnfreezeRxFifo | ( | TDM_RX_STRUCT_Type * | base | ) |
UnFreeze Rx FIFO.
HW writes to the RX FIFO and advances the FIFO write pointer.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ActivateRx | ( | TDM_RX_STRUCT_Type * | base | ) |
Start Rx FIFO.
Sets Receiver state to on.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_DeActivateRx | ( | TDM_RX_STRUCT_Type * | base | ) |
Stop Rx FIFO.
Sets Receiver state to off.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint32_t Cy_AudioTDM_ReadSilentRXFifo | ( | TDM_RX_STRUCT_Type * | base | ) |
When the RX FIFO is empty, a read from this register returns "0".
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint8_t Cy_AudioTDM_GetNumInRxFifo | ( | TDM_RX_STRUCT_Type * | base | ) |
Reads RX FIFO status.
Number of used/occupied entries in the RX FIFO. The field value is in the range [0, 128]. When "0", the FIFO is empty. When "128", the FIFO is full.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint8_t Cy_AudioTDM_GetRxReadPointer | ( | TDM_RX_STRUCT_Type * | base | ) |
Reads RX FIFO Read Pointer RX FIFO read pointer: FIFO location from which a data is read.
This functionality is intended for debugging purposes.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE uint8_t Cy_AudioTDM_GetRxWritePointer | ( | TDM_RX_STRUCT_Type * | base | ) |
Reads RX FIFO Write Pointer RX FIFO write pointer: FIFO location at which a new data is written by the hardware.
This functionality is intended for debugging purposes.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_EnableRxTestMode | ( | TDM_RX_STRUCT_Type * | base | ) |
Enables Test mode (intended to be used with (master transmitter, slave receiver) configuration).
Both TX and RX should not be set in Test mode simultaneously.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_DisableRxTestMode | ( | TDM_RX_STRUCT_Type * | base | ) |
Disable RX test mode.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ClearTxInterrupt | ( | TDM_TX_STRUCT_Type * | base, |
uint32_t | interrupt | ||
) |
Clear TX interrupt.
base | The pointer to the I2S/TDM instance address. |
interrupt | interrupt |
__STATIC_INLINE void Cy_AudioTDM_SetTxInterrupt | ( | TDM_TX_STRUCT_Type * | base, |
uint32_t | interrupt | ||
) |
Set the Tx Interrupt.
base | The pointer to the I2S/TDM instance address. |
interrupt | interrupts to set. |
__STATIC_INLINE uint32_t Cy_AudioTDM_GetTxInterruptMask | ( | TDM_TX_STRUCT_Type * | base | ) |
Get TX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_SetTxInterruptMask | ( | TDM_TX_STRUCT_Type * | base, |
uint32_t | interrupt | ||
) |
Set TX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
interrupt | interrupt |
__STATIC_INLINE uint32_t Cy_AudioTDM_GetTxInterruptStatusMasked | ( | TDM_TX_STRUCT_Type * | base | ) |
Reflects a bitwise AND between the INTR_TX and INTR_TX_MASK registers.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_SetTxTriggerInterruptMask | ( | TDM_TX_STRUCT_Type * | base | ) |
Sets TX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ClearTxTriggerInterruptMask | ( | TDM_TX_STRUCT_Type * | base | ) |
Clears TX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ClearRxInterrupt | ( | TDM_RX_STRUCT_Type * | base, |
uint32_t | interrupt | ||
) |
Clears RX interrupt.
base | The pointer to the I2S/TDM instance address. |
interrupt | interrupt |
__STATIC_INLINE void Cy_AudioTDM_SetRxInterrupt | ( | TDM_RX_STRUCT_Type * | base, |
uint32_t | interrupt | ||
) |
Sets RX interrupt.
base | The pointer to the I2S/TDM instance address. |
interrupt | interrupt |
__STATIC_INLINE uint32_t Cy_AudioTDM_GetRxInterruptMask | ( | TDM_RX_STRUCT_Type * | base | ) |
Returns RX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_SetRxInterruptMask | ( | TDM_RX_STRUCT_Type * | base, |
uint32_t | interrupt | ||
) |
Sets RX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
interrupt | interrupt |
__STATIC_INLINE uint32_t Cy_AudioTDM_GetRxInterruptStatusMasked | ( | TDM_RX_STRUCT_Type * | base | ) |
Returns a bitwise AND between the INTR_RX and INTR_RX_MASK registers.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_SetRxTriggerInterruptMask | ( | TDM_RX_STRUCT_Type * | base | ) |
Sets Rx Interrupt Mask.
base | The pointer to the I2S/TDM instance address. |
__STATIC_INLINE void Cy_AudioTDM_ClearRxTriggerInterruptMask | ( | TDM_RX_STRUCT_Type * | base | ) |
Clear RX interrupt Mask.
base | The pointer to the I2S/TDM instance address. |