Functions
Configuration functions
Peripheral Driver » LL Driver » I2S » Functions
Collaboration diagram for Configuration functions:

## Functions
__STATIC_INLINE void | ll_i2s_enable (i2s_regs_t *I2Sx)
| Enable I2S. More...
__STATIC_INLINE void | ll_i2s_disable (i2s_regs_t *I2Sx)
| Disable I2S. More...
__STATIC_INLINE uint32_t | ll_i2s_is_enabled (i2s_regs_t *I2Sx)
| Check if I2S is enabled. More...
__STATIC_INLINE void | ll_i2s_enable_rxblock (i2s_regs_t *I2Sx)
| Enable I2S RX block. More...
__STATIC_INLINE void | ll_i2s_disable_rxblock (i2s_regs_t *I2Sx)
| Disable I2S RX block. More...
__STATIC_INLINE uint32_t | ll_i2s_is_enabled_rxblock (i2s_regs_t *I2Sx)
| Check if I2S RX block is enabled. More...
__STATIC_INLINE void | ll_i2s_enable_txblock (i2s_regs_t *I2Sx)
| Enable I2S TX block. More...
__STATIC_INLINE void | ll_i2s_disable_txblock (i2s_regs_t *I2Sx)
| Disable I2S TX block. More...
__STATIC_INLINE uint32_t | ll_i2s_is_enabled_txblock (i2s_regs_t *I2Sx)
| Check if I2S TX block is enabled. More...
__STATIC_INLINE void | ll_i2s_enable_clock (i2s_regs_t *I2Sx)
| Enable I2S clock. More...
__STATIC_INLINE void | ll_i2s_disable_clock (i2s_regs_t *I2Sx)
| Disable I2S clock. More...
__STATIC_INLINE uint32_t | ll_i2s_is_enabled_clock (i2s_regs_t *I2Sx)
| Check if I2S clock is enabled. More...
__STATIC_INLINE void | ll_i2s_set_wss (i2s_regs_t *I2Sx, uint32_t cycles)
| Set word select line cycles for left or right sample. More...
__STATIC_INLINE uint32_t | ll_i2s_get_wss (i2s_regs_t *I2Sx)
| Get word select line cycles for left or right sample. More...
__STATIC_INLINE void | ll_i2s_set_sclkg (i2s_regs_t *I2Sx, uint32_t cycles)
| Set the gating of sclk. More...
__STATIC_INLINE uint32_t | ll_i2s_get_sclkg (i2s_regs_t *I2Sx)
| Get the gating of sclk. More...
__STATIC_INLINE void | ll_i2s_clr_rxfifo_all (i2s_regs_t *I2Sx)
| Clear I2S RX FIFO in all channels. More...
__STATIC_INLINE void | ll_i2s_clr_txfifo_all (i2s_regs_t *I2Sx)
| Clear I2S TX FIFO in all channels. More...
__STATIC_INLINE void | ll_i2s_set_clock_div (uint32_t div)
| Set I2S clock divider. More...
__STATIC_INLINE uint32_t | ll_i2s_get_clock_div (void)
| Get I2S clock divider. More...
__STATIC_INLINE void | ll_i2s_enable_clock_div (void)
| Enable I2S clock divider. More...
__STATIC_INLINE void | ll_i2s_disable_clock_div (void)
| Disable I2S clock divider. More...
__STATIC_INLINE uint32_t | ll_i2s_is_enabled_clock_div (void)
| Check if I2S clock divider is enabled. More...
__STATIC_INLINE void | ll_i2s_set_clock_src (uint32_t src)
| Set I2S clock source. More...
__STATIC_INLINE uint32_t | ll_i2s_get_clock_src (void)
| Get I2S clock source. More...

## Detailed Description

## Function Documentation

## ◆ ll_i2s_clr_rxfifo_all()

__STATIC_INLINE void ll_i2s_clr_rxfifo_all | ( | i2s_regs_t * | I2Sx | ) |

Clear I2S RX FIFO in all channels.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | RXFIFO_RST | RST | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 642 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_clr_txfifo_all()

__STATIC_INLINE void ll_i2s_clr_txfifo_all | ( | i2s_regs_t * | I2Sx | ) |

Clear I2S TX FIFO in all channels.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | TXFIFO_RST | RST | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 661 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_disable()

__STATIC_INLINE void ll_i2s_disable | ( | i2s_regs_t * | I2Sx | ) |

Disable I2S.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | ENABLE | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 338 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_disable_clock()

__STATIC_INLINE void ll_i2s_disable_clock | ( | i2s_regs_t * | I2Sx | ) |

Disable I2S clock.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 509 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_disable_clock_div()

__STATIC_INLINE void ll_i2s_disable_clock_div | ( | void |  | ) |

Disable I2S clock divider.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | DIV_EN | +-------------------—+--------------------------------—+ \endrst

Return values

  None |

Definition at line 734 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_disable_rxblock()

__STATIC_INLINE void ll_i2s_disable_rxblock | ( | i2s_regs_t * | I2Sx | ) |

Disable I2S RX block.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | RBEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 395 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_disable_txblock()

__STATIC_INLINE void ll_i2s_disable_txblock | ( | i2s_regs_t * | I2Sx | ) |

Disable I2S TX block.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | TBEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 452 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_enable()

__STATIC_INLINE void ll_i2s_enable | ( | i2s_regs_t * | I2Sx | ) |

Enable I2S.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | ENABLE | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 319 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_enable_clock()

__STATIC_INLINE void ll_i2s_enable_clock | ( | i2s_regs_t * | I2Sx | ) |

Enable I2S clock.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 490 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_enable_clock_div()

__STATIC_INLINE void ll_i2s_enable_clock_div | ( | void |  | ) |

Enable I2S clock divider.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | DIV_EN | +-------------------—+--------------------------------—+ \endrst

Return values

  None |

Definition at line 716 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_enable_rxblock()

__STATIC_INLINE void ll_i2s_enable_rxblock | ( | i2s_regs_t * | I2Sx | ) |

Enable I2S RX block.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | RBEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 376 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_enable_txblock()

__STATIC_INLINE void ll_i2s_enable_txblock | ( | i2s_regs_t * | I2Sx | ) |

Enable I2S TX block.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | TBEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  None |

Definition at line 433 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_get_clock_div()

__STATIC_INLINE uint32_t ll_i2s_get_clock_div | ( | void |  | ) |

Get I2S clock divider.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | DIV | +-------------------—+--------------------------------—+ \endrst

Return values

  Returned | Value can between: 0 ~ 0xFFF

Definition at line 698 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_get_clock_src()

__STATIC_INLINE uint32_t ll_i2s_get_clock_src | ( | void |  | ) |

Get I2S clock source.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | SRC | +-------------------—+--------------------------------—+ \endrst

Return values

  Returned | Value can be one of the following values: LL_I2S_CLOCK_SRC_96M LL_I2S_CLOCK_SRC_32M

Definition at line 793 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_get_sclkg()

__STATIC_INLINE uint32_t ll_i2s_get_sclkg | ( | i2s_regs_t * | I2Sx | ) |

Get the gating of sclk.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKCONFIG | SCLKG | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  Returned | Value can be one of the following values: LL_I2S_SCLKG_NONE LL_I2S_SCLKG_CYCLES_12 LL_I2S_SCLKG_CYCLES_16 LL_I2S_SCLKG_CYCLES_20 LL_I2S_SCLKG_CYCLES_24

Definition at line 623 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_get_wss()

__STATIC_INLINE uint32_t ll_i2s_get_wss | ( | i2s_regs_t * | I2Sx | ) |

Get word select line cycles for left or right sample.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKCONFIG | WSS | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  Returned | Value can be one of the following values: LL_I2S_WS_CYCLES_16 LL_I2S_WS_CYCLES_24 LL_I2S_WS_CYCLES_32

Definition at line 574 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_is_enabled()

__STATIC_INLINE uint32_t ll_i2s_is_enabled | ( | i2s_regs_t * | I2Sx | ) |

Check if I2S is enabled.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | ENABLE | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  State | of bit (1 or 0).

Definition at line 357 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_is_enabled_clock()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_clock | ( | i2s_regs_t * | I2Sx | ) |

Check if I2S clock is enabled.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  State | of bit (1 or 0).

Definition at line 528 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_is_enabled_clock_div()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_clock_div | ( | void |  | ) |

Check if I2S clock divider is enabled.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | DIV_EN | +-------------------—+--------------------------------—+ \endrst

Return values

  State | of bit (1 or 0).

Definition at line 752 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_is_enabled_rxblock()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_rxblock | ( | i2s_regs_t * | I2Sx | ) |

Check if I2S RX block is enabled.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | RBEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  State | of bit (1 or 0).

Definition at line 414 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_is_enabled_txblock()

__STATIC_INLINE uint32_t ll_i2s_is_enabled_txblock | ( | i2s_regs_t * | I2Sx | ) |

Check if I2S TX block is enabled.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | TBEN | EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance

Return values

  State | of bit (1 or 0).

Definition at line 471 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_set_clock_div()

__STATIC_INLINE void ll_i2s_set_clock_div | ( | uint32_t | div | ) |

Set I2S clock divider.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | DIV | +-------------------—+--------------------------------—+ \endrst

Parameters

  div | This parameter can between: 0 ~ 0xFFF

Return values

  None |

Definition at line 680 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_set_clock_src()

__STATIC_INLINE void ll_i2s_set_clock_src | ( | uint32_t | src | ) |

Set I2S clock source.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | I2S_CLK_CFG | SRC | +-------------------—+--------------------------------—+ \endrst

Parameters

  src | This parameter can be one of the following values: LL_I2S_CLOCK_SRC_96M LL_I2S_CLOCK_SRC_32M

Return values

  None |

Definition at line 773 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_set_sclkg()

__STATIC_INLINE void ll_i2s_set_sclkg | ( | i2s_regs_t * | I2Sx,
|  | uint32_t | cycles
| ) |  |

Set the gating of sclk.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKCONFIG | SCLKG | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance
  cycles | This parameter can be one of the following values: LL_I2S_SCLKG_NONE LL_I2S_SCLKG_CYCLES_12 LL_I2S_SCLKG_CYCLES_16 LL_I2S_SCLKG_CYCLES_20 LL_I2S_SCLKG_CYCLES_24

Return values

  None |

Definition at line 599 of file gr55xx_ll_i2s.h.

## ◆ ll_i2s_set_wss()

__STATIC_INLINE void ll_i2s_set_wss | ( | i2s_regs_t * | I2Sx,
|  | uint32_t | cycles
| ) |  |

Set word select line cycles for left or right sample.

Note
  This bit should be written only when I2S is disabled (I2S_EN = 0) for correct operation.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CLKCONFIG | WSS | +-------------------—+--------------------------------—+ \endrst

Parameters

  I2Sx | I2S instance
  cycles | This parameter can be one of the following values: LL_I2S_WS_CYCLES_16 LL_I2S_WS_CYCLES_24 LL_I2S_WS_CYCLES_32

Return values

  None |

Definition at line 552 of file gr55xx_ll_i2s.h.