Channel Configuration functions

Functions

__STATIC_INLINE uint32_t ll_i2s_receive_ldata (i2s_regs_t *I2Sx, uint8_t channel)
 Read one data from left RX FIFO in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_receive_rdata (i2s_regs_t *I2Sx, uint8_t channel)
 Read one data from right RX FIFO in a channel. More...
 
__STATIC_INLINE void ll_i2s_transmit_ldata (i2s_regs_t *I2Sx, uint8_t channel, uint32_t data)
 Write one data to left TX FIFO in a channel. More...
 
__STATIC_INLINE void ll_i2s_transmit_rdata (i2s_regs_t *I2Sx, uint8_t channel, uint32_t data)
 Write one data to right TX FIFO in a channel. More...
 
__STATIC_INLINE void ll_i2s_enable_rx (i2s_regs_t *I2Sx, uint8_t channel)
 Enable RX in a channel. More...
 
__STATIC_INLINE void ll_i2s_disable_rx (i2s_regs_t *I2Sx, uint8_t channel)
 Disable RX in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_is_enabled_rx (i2s_regs_t *I2Sx, uint8_t channel)
 Check if RX in a channel is enabled. More...
 
__STATIC_INLINE void ll_i2s_enable_tx (i2s_regs_t *I2Sx, uint8_t channel)
 Enable TX in a channel. More...
 
__STATIC_INLINE void ll_i2s_disable_tx (i2s_regs_t *I2Sx, uint8_t channel)
 Disable TX in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_is_enabled_tx (i2s_regs_t *I2Sx, uint8_t channel)
 Check if TX in a channel is enabled. More...
 
__STATIC_INLINE void ll_i2s_set_rxsize (i2s_regs_t *I2Sx, uint8_t channel, uint32_t size)
 Set receive data width in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_get_rxsize (i2s_regs_t *I2Sx, uint8_t channel)
 Get receive data width in a channel. More...
 
__STATIC_INLINE void ll_i2s_set_txsize (i2s_regs_t *I2Sx, uint8_t channel, uint32_t size)
 Set transmit data width in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_get_txsize (i2s_regs_t *I2Sx, uint8_t channel)
 Get transmit data width in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_get_it_flag (i2s_regs_t *I2Sx, uint8_t channel)
 Get interrupt flag in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_is_active_it_flag (i2s_regs_t *I2Sx, uint8_t channel, uint32_t flag)
 Check interrupt flag in a channel. More...
 
__STATIC_INLINE void ll_i2s_enable_it (i2s_regs_t *I2Sx, uint8_t channel, uint32_t mask)
 Enable interrupt in a channel. More...
 
__STATIC_INLINE void ll_i2s_disable_it (i2s_regs_t *I2Sx, uint8_t channel, uint32_t mask)
 Disable interrupt in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_is_enabled_it (i2s_regs_t *I2Sx, uint8_t channel, uint32_t mask)
 Check if interrupt in a channel is enabled. More...
 
__STATIC_INLINE uint32_t ll_i2s_clear_it_rxovr (i2s_regs_t *I2Sx, uint8_t channel)
 Clear RX FIFO data overrun interrupt flag in a channel. More...
 
__STATIC_INLINE uint32_t ll_i2s_clear_it_txovr (i2s_regs_t *I2Sx, uint8_t channel)
 Clear TX FIFO data overrun interrupt flag in a channel. More...
 
__STATIC_INLINE void ll_i2s_set_rx_fifo_threshold (i2s_regs_t *I2Sx, uint8_t channel, uint32_t threshold)
 Set threshold of RXFIFO in a channel that triggers an RXDA event. More...
 
__STATIC_INLINE uint32_t ll_i2s_get_rx_fifo_threshold (i2s_regs_t *I2Sx, uint8_t channel)
 Get threshold of RXFIFO in a channel that triggers an RXDA event. More...
 
__STATIC_INLINE void ll_i2s_set_tx_fifo_threshold (i2s_regs_t *I2Sx, uint8_t channel, uint32_t threshold)
 Set threshold of TXFIFO in a channel that triggers an TXFE event. More...
 
__STATIC_INLINE uint32_t ll_i2s_get_tx_fifo_threshold (i2s_regs_t *I2Sx, uint8_t channel)
 Get threshold of TXFIFO in a channel that triggers an TXFE event. More...
 
__STATIC_INLINE void ll_i2s_clr_rxfifo_channel (i2s_regs_t *I2Sx, uint8_t channel)
 Clear RX FIFO data in a channel. More...
 
__STATIC_INLINE void ll_i2s_clr_txfifo_channel (i2s_regs_t *I2Sx, uint8_t channel)
 Clear TX FIFO data in a channel. More...
 

Detailed Description

Function Documentation

◆ ll_i2s_clear_it_rxovr()

__STATIC_INLINE uint32_t ll_i2s_clear_it_rxovr ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Clear RX FIFO data overrun interrupt flag in a channel.

Register BitsName
RXOVR RXCHO
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
Stateof bit (1 or 0).

◆ ll_i2s_clear_it_txovr()

__STATIC_INLINE uint32_t ll_i2s_clear_it_txovr ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Clear TX FIFO data overrun interrupt flag in a channel.

Register BitsName
TXOVR TXCHO
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
Stateof bit (1 or 0).

◆ ll_i2s_clr_rxfifo_channel()

__STATIC_INLINE void ll_i2s_clr_rxfifo_channel ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Clear RX FIFO data in a channel.

Register BitsName
RXFIFO_FLUSH FLUSH
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_clr_txfifo_channel()

__STATIC_INLINE void ll_i2s_clr_txfifo_channel ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Clear TX FIFO data in a channel.

Register BitsName
TXFIFO_FLUSH FLUSH
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_disable_it()

__STATIC_INLINE void ll_i2s_disable_it ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  mask 
)

Disable interrupt in a channel.

Register BitsName
INTMASK TXFO
INTMASK TXFE
INTMASK RXFO
INTMASK RXDA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
maskThis parameter can be one or more of the following values:
Return values
None

◆ ll_i2s_disable_rx()

__STATIC_INLINE void ll_i2s_disable_rx ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Disable RX in a channel.

Register BitsName
RXEN EN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_disable_tx()

__STATIC_INLINE void ll_i2s_disable_tx ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Disable TX in a channel.

Register BitsName
TXEN EN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_enable_it()

__STATIC_INLINE void ll_i2s_enable_it ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  mask 
)

Enable interrupt in a channel.

Register BitsName
INTMASK TXFO
INTMASK TXFE
INTMASK RXFO
INTMASK RXDA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
maskThis parameter can be one or more of the following values:
Return values
None

◆ ll_i2s_enable_rx()

__STATIC_INLINE void ll_i2s_enable_rx ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Enable RX in a channel.

Register BitsName
RXEN EN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_enable_tx()

__STATIC_INLINE void ll_i2s_enable_tx ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Enable TX in a channel.

Register BitsName
TXEN EN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_get_it_flag()

__STATIC_INLINE uint32_t ll_i2s_get_it_flag ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Get interrupt flag in a channel.

Register BitsName
INTSTAT TXFO
INTSTAT TXFE
INTSTAT RXFO
INTSTAT RXDA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
ReturnedValue can be one or more of the following values:

◆ ll_i2s_get_rx_fifo_threshold()

__STATIC_INLINE uint32_t ll_i2s_get_rx_fifo_threshold ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Get threshold of RXFIFO in a channel that triggers an RXDA event.

Register BitsName
RXFIFO_TL TL
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
ReturnedValue can be one of the following values:

◆ ll_i2s_get_rxsize()

__STATIC_INLINE uint32_t ll_i2s_get_rxsize ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Get receive data width in a channel.

Register BitsName
RXSIZE WLEN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
ReturnedValue can be one of the following values:

◆ ll_i2s_get_tx_fifo_threshold()

__STATIC_INLINE uint32_t ll_i2s_get_tx_fifo_threshold ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Get threshold of TXFIFO in a channel that triggers an TXFE event.

Register BitsName
TXFIFO_TL TL
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
ReturnedValue can be one of the following values:

◆ ll_i2s_get_txsize()

__STATIC_INLINE uint32_t ll_i2s_get_txsize ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Get transmit data width in a channel.

Register BitsName
TXSIZE WLEN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
ReturnedValue can be one of the following values:

◆ ll_i2s_is_active_it_flag()

__STATIC_INLINE uint32_t ll_i2s_is_active_it_flag ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  flag 
)

Check interrupt flag in a channel.

Register BitsName
INTSTAT TXFO
INTSTAT TXFE
INTSTAT RXFO
INTSTAT RXDA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
flagThis parameter can be one or more of the following values:
Stateof bit (1 or 0).

◆ ll_i2s_is_enabled_it()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_it ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  mask 
)

Check if interrupt in a channel is enabled.

Register BitsName
INTMASK TXFO
INTMASK TXFE
INTMASK RXFO
INTMASK RXDA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
maskThis parameter can be one or more of the following values:
Return values
Stateof bit (1 or 0).

◆ ll_i2s_is_enabled_rx()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_rx ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Check if RX in a channel is enabled.

Register BitsName
RXEN EN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
Stateof bit (1 or 0).

◆ ll_i2s_is_enabled_tx()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_tx ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Check if TX in a channel is enabled.

Register BitsName
TXEN EN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
Stateof bit (1 or 0).

◆ ll_i2s_receive_ldata()

__STATIC_INLINE uint32_t ll_i2s_receive_ldata ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Read one data from left RX FIFO in a channel.

Register BitsName
DATA_L DATA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_receive_rdata()

__STATIC_INLINE uint32_t ll_i2s_receive_rdata ( i2s_regs_t *  I2Sx,
uint8_t  channel 
)

Read one data from right RX FIFO in a channel.

Register BitsName
DATA_R DATA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
Return values
None

◆ ll_i2s_set_rx_fifo_threshold()

__STATIC_INLINE void ll_i2s_set_rx_fifo_threshold ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  threshold 
)

Set threshold of RXFIFO in a channel that triggers an RXDA event.

Register BitsName
RXFIFO_TL TL
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
thresholdThis parameter can be one of the following values:
Return values
None

◆ ll_i2s_set_rxsize()

__STATIC_INLINE void ll_i2s_set_rxsize ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  size 
)

Set receive data width in a channel.

Note
These bits should not be changed when channel is enabled.
Register BitsName
RXSIZE WLEN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
sizeThis parameter can be one of the following values:
Return values
None

◆ ll_i2s_set_tx_fifo_threshold()

__STATIC_INLINE void ll_i2s_set_tx_fifo_threshold ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  threshold 
)

Set threshold of TXFIFO in a channel that triggers an TXFE event.

Register BitsName
TXFIFO_TL TL
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
thresholdThis parameter can be one of the following values:
Return values
None

◆ ll_i2s_set_txsize()

__STATIC_INLINE void ll_i2s_set_txsize ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  size 
)

Set transmit data width in a channel.

Note
These bits should not be changed when channel is enabled.
Register BitsName
TXSIZE WLEN
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
sizeThis parameter can be one of the following values:
Return values
None

◆ ll_i2s_transmit_ldata()

__STATIC_INLINE void ll_i2s_transmit_ldata ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  data 
)

Write one data to left TX FIFO in a channel.

Register BitsName
DATA_L DATA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
dataThe data to send
Return values
None

◆ ll_i2s_transmit_rdata()

__STATIC_INLINE void ll_i2s_transmit_rdata ( i2s_regs_t *  I2Sx,
uint8_t  channel,
uint32_t  data 
)

Write one data to right TX FIFO in a channel.

Register BitsName
DATA_R DATA
Parameters
I2SxI2S instance
channelThe special channel: 0 ~ 3
dataThe data to send
Return values
None