macros to handle interrupts and specific configurations
More...
|
#define | __HAL_SAI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SAI_STATE_RESET) |
| Reset SAI handle state.
|
|
#define | __HAL_SAI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IMR |= (__INTERRUPT__)) |
| Enable the specified SAI interrupts.
|
|
#define | __HAL_SAI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IMR &= (~(__INTERRUPT__))) |
| Disable the specified SAI interrupts.
|
|
#define | __HAL_SAI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IMR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
| Check whether the specified SAI interrupt source is enabled or not.
|
|
#define | __HAL_SAI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__)) |
| Check whether the specified SAI flag is set or not.
|
|
#define | __HAL_SAI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->CLRFR = (__FLAG__)) |
| Clear the specified SAI pending flag.
|
|
#define | __HAL_SAI_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= SAI_xCR1_SAIEN) |
| Enable SAI.
|
|
#define | __HAL_SAI_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~SAI_xCR1_SAIEN) |
| Disable SAI.
|
|
macros to handle interrupts and specific configurations
◆ __HAL_SAI_CLEAR_FLAG
#define __HAL_SAI_CLEAR_FLAG |
( |
|
__HANDLE__, |
|
|
|
__FLAG__ |
|
) |
| ((__HANDLE__)->Instance->CLRFR = (__FLAG__)) |
Clear the specified SAI pending flag.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
__FLAG__ | specifies the flag to check. This parameter can be any combination of the following values:
- SAI_FLAG_OVRUDR: Clear Overrun underrun
- SAI_FLAG_MUTEDET: Clear Mute detection
- SAI_FLAG_WCKCFG: Clear Wrong Clock Configuration
- SAI_FLAG_FREQ: Clear FIFO request
- SAI_FLAG_CNRDY: Clear Codec not ready
- SAI_FLAG_AFSDET: Clear Anticipated frame synchronization detection
- SAI_FLAG_LFSDET: Clear Late frame synchronization detection
|
- Return values
-
◆ __HAL_SAI_DISABLE
#define __HAL_SAI_DISABLE |
( |
|
__HANDLE__ | ) |
((__HANDLE__)->Instance->CR1 &= ~SAI_xCR1_SAIEN) |
Disable SAI.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
- Return values
-
◆ __HAL_SAI_DISABLE_IT
#define __HAL_SAI_DISABLE_IT |
( |
|
__HANDLE__, |
|
|
|
__INTERRUPT__ |
|
) |
| ((__HANDLE__)->Instance->IMR &= (~(__INTERRUPT__))) |
Disable the specified SAI interrupts.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
__INTERRUPT__ | specifies the interrupt source to enable or disable. This parameter can be one of the following values:
- SAI_IT_OVRUDR: Overrun underrun interrupt enable
- SAI_IT_MUTEDET: Mute detection interrupt enable
- SAI_IT_WCKCFG: Wrong Clock Configuration interrupt enable
- SAI_IT_FREQ: FIFO request interrupt enable
- SAI_IT_CNRDY: Codec not ready interrupt enable
- SAI_IT_AFSDET: Anticipated frame synchronization detection interrupt enable
- SAI_IT_LFSDET: Late frame synchronization detection interrupt enable
|
- Return values
-
◆ __HAL_SAI_ENABLE
#define __HAL_SAI_ENABLE |
( |
|
__HANDLE__ | ) |
((__HANDLE__)->Instance->CR1 |= SAI_xCR1_SAIEN) |
Enable SAI.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
- Return values
-
◆ __HAL_SAI_ENABLE_IT
#define __HAL_SAI_ENABLE_IT |
( |
|
__HANDLE__, |
|
|
|
__INTERRUPT__ |
|
) |
| ((__HANDLE__)->Instance->IMR |= (__INTERRUPT__)) |
Enable the specified SAI interrupts.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
__INTERRUPT__ | specifies the interrupt source to enable or disable. This parameter can be one of the following values:
- SAI_IT_OVRUDR: Overrun underrun interrupt enable
- SAI_IT_MUTEDET: Mute detection interrupt enable
- SAI_IT_WCKCFG: Wrong Clock Configuration interrupt enable
- SAI_IT_FREQ: FIFO request interrupt enable
- SAI_IT_CNRDY: Codec not ready interrupt enable
- SAI_IT_AFSDET: Anticipated frame synchronization detection interrupt enable
- SAI_IT_LFSDET: Late frame synchronization detection interrupt enable
|
- Return values
-
◆ __HAL_SAI_GET_FLAG
#define __HAL_SAI_GET_FLAG |
( |
|
__HANDLE__, |
|
|
|
__FLAG__ |
|
) |
| ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__)) |
Check whether the specified SAI flag is set or not.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
__FLAG__ | specifies the flag to check. This parameter can be one of the following values:
- SAI_FLAG_OVRUDR: Overrun underrun flag.
- SAI_FLAG_MUTEDET: Mute detection flag.
- SAI_FLAG_WCKCFG: Wrong Clock Configuration flag.
- SAI_FLAG_FREQ: FIFO request flag.
- SAI_FLAG_CNRDY: Codec not ready flag.
- SAI_FLAG_AFSDET: Anticipated frame synchronization detection flag.
- SAI_FLAG_LFSDET: Late frame synchronization detection flag.
|
- Return values
-
The | new state of FLAG (TRUE or FALSE). |
◆ __HAL_SAI_GET_IT_SOURCE
#define __HAL_SAI_GET_IT_SOURCE |
( |
|
__HANDLE__, |
|
|
|
__INTERRUPT__ |
|
) |
| ((((__HANDLE__)->Instance->IMR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Check whether the specified SAI interrupt source is enabled or not.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
__INTERRUPT__ | specifies the SAI interrupt source to check. This parameter can be one of the following values:
- SAI_IT_OVRUDR: Overrun underrun interrupt enable
- SAI_IT_MUTEDET: Mute detection interrupt enable
- SAI_IT_WCKCFG: Wrong Clock Configuration interrupt enable
- SAI_IT_FREQ: FIFO request interrupt enable
- SAI_IT_CNRDY: Codec not ready interrupt enable
- SAI_IT_AFSDET: Anticipated frame synchronization detection interrupt enable
- SAI_IT_LFSDET: Late frame synchronization detection interrupt enable
|
- Return values
-
The | new state of INTERRUPT (TRUE or FALSE). |
◆ __HAL_SAI_RESET_HANDLE_STATE
Reset SAI handle state.
- Parameters
-
__HANDLE__ | specifies the SAI Handle. |
- Return values
-