STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
I2S Exported Macros
Collaboration diagram for I2S Exported Macros:

Macros

#define __HAL_I2S_RESET_HANDLE_STATE(__HANDLE__)
 Reset I2S handle state.
 
#define __HAL_I2S_ENABLE(__HANDLE__)
 Enable the specified SPI peripheral (in I2S mode).
 
#define __HAL_I2S_DISABLE(__HANDLE__)
 Disable the specified SPI peripheral (in I2S mode).
 
#define __HAL_I2S_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the specified I2S interrupts.
 
#define __HAL_I2S_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the specified I2S interrupts.
 
#define __HAL_I2S_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Checks if the specified I2S interrupt source is enabled or disabled.
 
#define __HAL_I2S_GET_FLAG(__HANDLE__, __FLAG__)
 Checks whether the specified I2S flag is set or not.
 
#define __HAL_I2S_CLEAR_OVRFLAG(__HANDLE__)
 Clears the I2S OVR pending flag.
 
#define __HAL_I2S_CLEAR_UDRFLAG(__HANDLE__)
 Clears the I2S UDR pending flag.
 
#define __HAL_I2S_FLUSH_RX_DR(__HANDLE__)
 Flush the I2S DR Register.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_I2S_RESET_HANDLE_STATE

#define __HAL_I2S_RESET_HANDLE_STATE ( __HANDLE__)

#include <stm32f4xx_hal_i2s.h>

Value:
((__HANDLE__)->State = HAL_I2S_STATE_RESET)
@ HAL_I2S_STATE_RESET

Reset I2S handle state.

Parameters
__HANDLE__specifies the I2S Handle.
Return values
None

Definition at line 340 of file stm32f4xx_hal_i2s.h.

◆ __HAL_I2S_ENABLE

#define __HAL_I2S_ENABLE ( __HANDLE__)

#include <stm32f4xx_hal_i2s.h>

Value:
(SET_BIT((__HANDLE__)->Instance->I2SCFGR, SPI_I2SCFGR_I2SE))

Enable the specified SPI peripheral (in I2S mode).

Parameters
__HANDLE__specifies the I2S Handle.
Return values
None

Definition at line 347 of file stm32f4xx_hal_i2s.h.

Referenced by HAL_I2S_DMAResume(), HAL_I2S_Receive(), HAL_I2S_Receive_DMA(), HAL_I2S_Receive_IT(), HAL_I2S_Transmit(), HAL_I2S_Transmit_DMA(), and HAL_I2S_Transmit_IT().

◆ __HAL_I2S_DISABLE

#define __HAL_I2S_DISABLE ( __HANDLE__)

#include <stm32f4xx_hal_i2s.h>

Value:
(CLEAR_BIT((__HANDLE__)->Instance->I2SCFGR, SPI_I2SCFGR_I2SE))

Disable the specified SPI peripheral (in I2S mode).

Parameters
__HANDLE__specifies the I2S Handle.
Return values
None

Definition at line 353 of file stm32f4xx_hal_i2s.h.

Referenced by HAL_I2S_DeInit(), and HAL_I2S_DMAStop().

◆ __HAL_I2S_ENABLE_IT

#define __HAL_I2S_ENABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_i2s.h>

Value:
(SET_BIT((__HANDLE__)->Instance->CR2,(__INTERRUPT__)))

Enable the specified I2S interrupts.

Parameters
__HANDLE__specifies the I2S Handle.
__INTERRUPT__specifies the interrupt source to enable or disable. This parameter can be one of the following values:
  • I2S_IT_TXE: Tx buffer empty interrupt enable
  • I2S_IT_RXNE: RX buffer not empty interrupt enable
  • I2S_IT_ERR: Error interrupt enable
Return values
None

Definition at line 364 of file stm32f4xx_hal_i2s.h.

Referenced by HAL_I2S_Receive_IT(), and HAL_I2S_Transmit_IT().

◆ __HAL_I2S_DISABLE_IT

#define __HAL_I2S_DISABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_i2s.h>

Value:
(CLEAR_BIT((__HANDLE__)->Instance->CR2,(__INTERRUPT__)))

Disable the specified I2S interrupts.

Parameters
__HANDLE__specifies the I2S Handle.
__INTERRUPT__specifies the interrupt source to enable or disable. This parameter can be one of the following values:
  • I2S_IT_TXE: Tx buffer empty interrupt enable
  • I2S_IT_RXNE: RX buffer not empty interrupt enable
  • I2S_IT_ERR: Error interrupt enable
Return values
None

Definition at line 375 of file stm32f4xx_hal_i2s.h.

Referenced by I2S_IRQHandler(), I2S_Receive_IT(), and I2S_Transmit_IT().

◆ __HAL_I2S_GET_IT_SOURCE

#define __HAL_I2S_GET_IT_SOURCE ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_i2s.h>

Value:
((((__HANDLE__)->Instance->CR2\
& (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Checks if the specified I2S interrupt source is enabled or disabled.

Parameters
__HANDLE__specifies the I2S Handle. This parameter can be I2S where x: 1, 2, or 3 to select the I2S peripheral.
__INTERRUPT__specifies the I2S interrupt source to check. This parameter can be one of the following values:
  • I2S_IT_TXE: Tx buffer empty interrupt enable
  • I2S_IT_RXNE: RX buffer not empty interrupt enable
  • I2S_IT_ERR: Error interrupt enable
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 387 of file stm32f4xx_hal_i2s.h.

Referenced by I2S_IRQHandler().

◆ __HAL_I2S_GET_FLAG

#define __HAL_I2S_GET_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_i2s.h>

Value:
((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Checks whether the specified I2S flag is set or not.

Parameters
__HANDLE__specifies the I2S Handle.
__FLAG__specifies the flag to check. This parameter can be one of the following values:
  • I2S_FLAG_RXNE: Receive buffer not empty flag
  • I2S_FLAG_TXE: Transmit buffer empty flag
  • I2S_FLAG_UDR: Underrun flag
  • I2S_FLAG_OVR: Overrun flag
  • I2S_FLAG_FRE: Frame error flag
  • I2S_FLAG_CHSIDE: Channel Side flag
  • I2S_FLAG_BSY: Busy flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 403 of file stm32f4xx_hal_i2s.h.

Referenced by HAL_I2S_Receive(), HAL_I2S_Transmit(), and I2S_WaitFlagStateUntilTimeout().

◆ __HAL_I2S_CLEAR_OVRFLAG

#define __HAL_I2S_CLEAR_OVRFLAG ( __HANDLE__)

#include <stm32f4xx_hal_i2s.h>

Value:
do{ \
__IO uint32_t tmpreg_ovr = 0x00U; \
tmpreg_ovr = (__HANDLE__)->Instance->DR; \
tmpreg_ovr = (__HANDLE__)->Instance->SR; \
UNUSED(tmpreg_ovr); \
}while(0U)

Clears the I2S OVR pending flag.

Parameters
__HANDLE__specifies the I2S Handle.
Return values
None

Definition at line 409 of file stm32f4xx_hal_i2s.h.

Referenced by HAL_I2S_DMAStop(), HAL_I2S_Receive(), HAL_I2S_Receive_DMA(), and I2S_IRQHandler().

◆ __HAL_I2S_CLEAR_UDRFLAG

#define __HAL_I2S_CLEAR_UDRFLAG ( __HANDLE__)

#include <stm32f4xx_hal_i2s.h>

Value:
do{\
__IO uint32_t tmpreg_udr = 0x00U;\
tmpreg_udr = ((__HANDLE__)->Instance->SR);\
UNUSED(tmpreg_udr); \
}while(0U)

Clears the I2S UDR pending flag.

Parameters
__HANDLE__specifies the I2S Handle.
Return values
None

Definition at line 419 of file stm32f4xx_hal_i2s.h.

Referenced by HAL_I2S_DMAStop(), HAL_I2S_Transmit(), and I2S_IRQHandler().

◆ __HAL_I2S_FLUSH_RX_DR

#define __HAL_I2S_FLUSH_RX_DR ( __HANDLE__)

#include <stm32f4xx_hal_i2s.h>

Value:
do{\
__IO uint32_t tmpreg_dr = 0x00U;\
tmpreg_dr = ((__HANDLE__)->Instance->DR);\
UNUSED(tmpreg_dr); \
}while(0U)

Flush the I2S DR Register.

Parameters
__HANDLE__specifies the I2S Handle.
Return values
None

Definition at line 428 of file stm32f4xx_hal_i2s.h.