API Reference | |
Low Power Callback | |
The driver supports SysPm callback for Deep Sleep transition. | |
Functions | |
cy_en_i2s_status_t | Cy_I2S_Init (I2S_Type *base, cy_stc_i2s_config_t const *config) |
Initializes the I2S module in accordance with a configuration structure. More... | |
void | Cy_I2S_DeInit (I2S_Type *base) |
Uninitializes the I2S module (reverts default register values). More... | |
__STATIC_INLINE void | Cy_I2S_EnableTx (I2S_Type *base) |
Starts an I2S transmission. More... | |
__STATIC_INLINE void | Cy_I2S_PauseTx (I2S_Type *base) |
Pauses an I2S transmission. More... | |
__STATIC_INLINE void | Cy_I2S_ResumeTx (I2S_Type *base) |
Resumes an I2S transmission. More... | |
__STATIC_INLINE void | Cy_I2S_DisableTx (I2S_Type *base) |
Stops an I2S transmission. More... | |
__STATIC_INLINE void | Cy_I2S_EnableRx (I2S_Type *base) |
Starts an I2S reception. More... | |
__STATIC_INLINE void | Cy_I2S_DisableRx (I2S_Type *base) |
Stops an I2S reception. More... | |
__STATIC_INLINE uint32_t | Cy_I2S_GetCurrentState (I2S_Type const *base) |
Returns the current I2S state (TX/RX running/paused/stopped). More... | |
__STATIC_INLINE void | Cy_I2S_ClearTxFifo (I2S_Type *base) |
Clears the TX FIFO (resets the Read/Write FIFO pointers). More... | |
__STATIC_INLINE uint32_t | Cy_I2S_GetNumInTxFifo (I2S_Type const *base) |
Gets the number of used words in the TX FIFO. More... | |
__STATIC_INLINE void | Cy_I2S_WriteTxData (I2S_Type *base, uint32_t data) |
Writes data to the TX FIFO. More... | |
__STATIC_INLINE uint8_t | Cy_I2S_GetTxReadPointer (I2S_Type const *base) |
Gets the TX FIFO Read pointer. More... | |
__STATIC_INLINE uint8_t | Cy_I2S_GetTxWritePointer (I2S_Type const *base) |
Gets the TX FIFO Write pointer. More... | |
__STATIC_INLINE void | Cy_I2S_FreezeTxFifo (I2S_Type *base) |
Freezes the TX FIFO. More... | |
__STATIC_INLINE void | Cy_I2S_UnfreezeTxFifo (I2S_Type *base) |
Unfreezes the TX FIFO. More... | |
__STATIC_INLINE void | Cy_I2S_ClearRxFifo (I2S_Type *base) |
Clears the RX FIFO (resets the Read/Write FIFO pointers). More... | |
__STATIC_INLINE uint32_t | Cy_I2S_GetNumInRxFifo (I2S_Type const *base) |
Gets the number of used words in the RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_I2S_ReadRxData (I2S_Type const *base) |
Reads data from the RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_I2S_ReadRxDataSilent (I2S_Type const *base) |
Reads data from the RX FIFO without updating the RX FIFO read pointer. More... | |
__STATIC_INLINE uint8_t | Cy_I2S_GetRxReadPointer (I2S_Type const *base) |
Gets the RX FIFO Read pointer. More... | |
__STATIC_INLINE uint8_t | Cy_I2S_GetRxWritePointer (I2S_Type const *base) |
Gets the RX FIFO Write pointer. More... | |
__STATIC_INLINE void | Cy_I2S_FreezeRxFifo (I2S_Type *base) |
Freezes the RX FIFO. More... | |
__STATIC_INLINE void | Cy_I2S_UnfreezeRxFifo (I2S_Type *base) |
Unfreezes the RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_I2S_GetInterruptStatus (I2S_Type const *base) |
Gets an interrupt status (returns a content of the INTR register). More... | |
__STATIC_INLINE void | Cy_I2S_ClearInterrupt (I2S_Type *base, uint32_t interrupt) |
Clears one or more interrupt factors (sets the INTR register). More... | |
__STATIC_INLINE void | Cy_I2S_SetInterrupt (I2S_Type *base, uint32_t interrupt) |
Sets one or more interrupt factors (sets the INTR_SET register). More... | |
__STATIC_INLINE uint32_t | Cy_I2S_GetInterruptMask (I2S_Type const *base) |
Returns the interrupt mask (a content of the INTR_MASK register). More... | |
__STATIC_INLINE void | Cy_I2S_SetInterruptMask (I2S_Type *base, uint32_t interrupt) |
Sets one or more interrupt factor masks (the INTR_MASK register). More... | |
__STATIC_INLINE uint32_t | Cy_I2S_GetInterruptStatusMasked (I2S_Type const *base) |
Returns the interrupt status masked (a content of the INTR_MASKED register). More... | |
cy_en_i2s_status_t Cy_I2S_Init | ( | I2S_Type * | base, |
cy_stc_i2s_config_t const * | config | ||
) |
Initializes the I2S module in accordance with a configuration structure.
base | The pointer to the I2S instance address. |
config | The pointer to a configuration structure. |
void Cy_I2S_DeInit | ( | I2S_Type * | base | ) |
Uninitializes the I2S module (reverts default register values).
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_EnableTx | ( | I2S_Type * | base | ) |
Starts an I2S transmission.
Interrupt enabling (by the Cy_I2S_SetInterruptMask) is required after this function call, in case if any I2S interrupts are used in the application.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_PauseTx | ( | I2S_Type * | base | ) |
Pauses an I2S transmission.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_ResumeTx | ( | I2S_Type * | base | ) |
Resumes an I2S transmission.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_DisableTx | ( | I2S_Type * | base | ) |
Stops an I2S transmission.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_EnableRx | ( | I2S_Type * | base | ) |
Starts an I2S reception.
Interrupt enabling (by the Cy_I2S_SetInterruptMask) is required after this function call, in case any I2S interrupts are used in the application.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_DisableRx | ( | I2S_Type * | base | ) |
Stops an I2S reception.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint32_t Cy_I2S_GetCurrentState | ( | I2S_Type const * | base | ) |
Returns the current I2S state (TX/RX running/paused/stopped).
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_ClearTxFifo | ( | I2S_Type * | base | ) |
Clears the TX FIFO (resets the Read/Write FIFO pointers).
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint32_t Cy_I2S_GetNumInTxFifo | ( | I2S_Type const * | base | ) |
Gets the number of used words in the TX FIFO.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_WriteTxData | ( | I2S_Type * | base, |
uint32_t | data | ||
) |
Writes data to the TX FIFO.
Increases the TX FIFO level.
base | The pointer to the I2S instance address. |
data | Data to be written to the TX FIFO. |
__STATIC_INLINE uint8_t Cy_I2S_GetTxReadPointer | ( | I2S_Type const * | base | ) |
Gets the TX FIFO Read pointer.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint8_t Cy_I2S_GetTxWritePointer | ( | I2S_Type const * | base | ) |
Gets the TX FIFO Write pointer.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_FreezeTxFifo | ( | I2S_Type * | base | ) |
Freezes the TX FIFO.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_UnfreezeTxFifo | ( | I2S_Type * | base | ) |
Unfreezes the TX FIFO.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_ClearRxFifo | ( | I2S_Type * | base | ) |
Clears the RX FIFO (resets the Read/Write FIFO pointers).
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint32_t Cy_I2S_GetNumInRxFifo | ( | I2S_Type const * | base | ) |
Gets the number of used words in the RX FIFO.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint32_t Cy_I2S_ReadRxData | ( | I2S_Type const * | base | ) |
Reads data from the RX FIFO.
Decreases the RX FIFO level.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint32_t Cy_I2S_ReadRxDataSilent | ( | I2S_Type const * | base | ) |
Reads data from the RX FIFO without updating the RX FIFO read pointer.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint8_t Cy_I2S_GetRxReadPointer | ( | I2S_Type const * | base | ) |
Gets the RX FIFO Read pointer.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint8_t Cy_I2S_GetRxWritePointer | ( | I2S_Type const * | base | ) |
Gets the RX FIFO Write pointer.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_FreezeRxFifo | ( | I2S_Type * | base | ) |
Freezes the RX FIFO.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_UnfreezeRxFifo | ( | I2S_Type * | base | ) |
Unfreezes the RX FIFO.
This function is for debug purposes.
base | The pointer to the I2S instance address. |
__STATIC_INLINE uint32_t Cy_I2S_GetInterruptStatus | ( | I2S_Type const * | base | ) |
Gets an interrupt status (returns a content of the INTR register).
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_ClearInterrupt | ( | I2S_Type * | base, |
uint32_t | interrupt | ||
) |
Clears one or more interrupt factors (sets the INTR register).
base | The pointer to the I2S instance address. |
interrupt | Interrupt bit mask Interrupt Masks. |
__STATIC_INLINE void Cy_I2S_SetInterrupt | ( | I2S_Type * | base, |
uint32_t | interrupt | ||
) |
Sets one or more interrupt factors (sets the INTR_SET register).
base | The pointer to the I2S instance address. |
interrupt | Interrupt bit mask Interrupt Masks. |
__STATIC_INLINE uint32_t Cy_I2S_GetInterruptMask | ( | I2S_Type const * | base | ) |
Returns the interrupt mask (a content of the INTR_MASK register).
base | The pointer to the I2S instance address. |
__STATIC_INLINE void Cy_I2S_SetInterruptMask | ( | I2S_Type * | base, |
uint32_t | interrupt | ||
) |
Sets one or more interrupt factor masks (the INTR_MASK register).
base | The pointer to the I2S instance address. |
interrupt | Interrupt bit mask Interrupt Masks. |
__STATIC_INLINE uint32_t Cy_I2S_GetInterruptStatusMasked | ( | I2S_Type const * | base | ) |
Returns the interrupt status masked (a content of the INTR_MASKED register).
base | The pointer to the I2S instance address. |