I2S control functions.
More...
I2S control functions.
===============================================================================
##### Peripheral State and Errors functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to control the I2S.
(+) hal_i2s_get_state() API can be helpful to check in run-time the state of the I2S peripheral
(+) hal_i2s_get_error() check in run-time Errors occurring during communication
(+) hal_i2s_set_timeout() set the timeout during internal process
(+) hal_i2s_set_tx_fifo_threshold() set the TX FIFO Threshold
(+) hal_i2s_set_rx_fifo_threshold() set the RX FIFO Threshold
(+) hal_i2s_get_tx_fifo_threshold() get the TX FIFO Threshold
(+) hal_i2s_get_rx_fifo_threshold() get the RX FIFO Threshold
◆ hal_i2s_get_error()
Return the I2S error code.
- Parameters
-
[in] | p_i2s | Pointer to an I2S handle which contains the configuration information for the specified I2S module. |
- Returns
- I2S error code in bitmap format
◆ hal_i2s_get_rx_fifo_threshold()
uint32_t hal_i2s_get_rx_fifo_threshold |
( |
i2s_handle_t * |
p_i2s | ) |
|
Get the RX FIFO threshold.
- Parameters
-
[in] | p_i2s | Pointer to an I2S handle which contains the configuration information for the specified I2S module. |
- Returns
- RX FIFO threshold
◆ hal_i2s_get_state()
Return the I2S handle state.
- Parameters
-
[in] | p_i2s | Pointer to an I2S handle which contains the configuration information for the specified I2S module. |
- Return values
-
◆ hal_i2s_get_tx_fifo_threshold()
uint32_t hal_i2s_get_tx_fifo_threshold |
( |
i2s_handle_t * |
p_i2s | ) |
|
Get the TX FIFO threshold.
- Parameters
-
[in] | p_i2s | Pointer to an I2S handle which contains the configuration information for the specified I2S module. |
- Returns
- TX FIFO threshold
◆ hal_i2s_resume_reg()
Restore some registers related to I2S configuration after sleep. This function must be used in conjunction with the hal_i2s_suspend_reg().
- Parameters
-
[in] | p_i2s | Pointer to a I2S handle which contains the configuration information for the specified I2S module. |
- Return values
-
◆ hal_i2s_set_rx_fifo_threshold()
Set the RX FIFO threshold.
- Parameters
-
[in] | p_i2s | Pointer to an I2S handle which contains the configuration information for the specified I2S module. |
[in] | threshold | RX FIFO threshold value ranging bwtween 0x0U ~ 0x7U. |
- Return values
-
◆ hal_i2s_set_tx_fifo_threshold()
Set the TX FIFO threshold.
- Parameters
-
[in] | p_i2s | Pointer to an I2S handle which contains the configuration information for the specified I2S module. |
[in] | threshold | TX FIFO threshold value ranging bwtween 0x0U ~ 0x7U. |
- Return values
-
◆ hal_i2s_suspend_reg()
Suspend some registers related to I2S configuration before sleep.
- Parameters
-
[in] | p_i2s | Pointer to a I2S handle which contains the configuration information for the specified I2S module. |
- Return values
-