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

Macros

#define __HAL_IRDA_RESET_HANDLE_STATE(__HANDLE__)
 Reset IRDA handle gstate & RxState.
 
#define __HAL_IRDA_FLUSH_DRREGISTER(__HANDLE__)
 Flush the IRDA DR register.
 
#define __HAL_IRDA_GET_FLAG(__HANDLE__, __FLAG__)
 Check whether the specified IRDA flag is set or not.
 
#define __HAL_IRDA_CLEAR_FLAG(__HANDLE__, __FLAG__)
 Clear the specified IRDA pending flag.
 
#define __HAL_IRDA_CLEAR_PEFLAG(__HANDLE__)
 Clear the IRDA PE pending flag.
 
#define __HAL_IRDA_CLEAR_FEFLAG(__HANDLE__)
 Clear the IRDA FE pending flag.
 
#define __HAL_IRDA_CLEAR_NEFLAG(__HANDLE__)
 Clear the IRDA NE pending flag.
 
#define __HAL_IRDA_CLEAR_OREFLAG(__HANDLE__)
 Clear the IRDA ORE pending flag.
 
#define __HAL_IRDA_CLEAR_IDLEFLAG(__HANDLE__)
 Clear the IRDA IDLE pending flag.
 
#define __HAL_IRDA_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the specified IRDA interrupt.
 
#define __HAL_IRDA_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the specified IRDA interrupt.
 
#define __HAL_IRDA_GET_IT_SOURCE(__HANDLE__, __IT__)
 Check whether the specified IRDA interrupt has occurred or not.
 
#define __HAL_IRDA_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)
 Macro to enable the IRDA's one bit sample method.
 
#define __HAL_IRDA_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)
 Macro to disable the IRDA's one bit sample method.
 
#define __HAL_IRDA_ENABLE(__HANDLE__)
 Enable UART/USART associated to IRDA Handle.
 
#define __HAL_IRDA_DISABLE(__HANDLE__)
 Disable UART/USART associated to IRDA Handle.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_IRDA_RESET_HANDLE_STATE

#define __HAL_IRDA_RESET_HANDLE_STATE ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
do{ \
(__HANDLE__)->gState = HAL_IRDA_STATE_RESET; \
(__HANDLE__)->RxState = HAL_IRDA_STATE_RESET; \
} while(0U)
@ HAL_IRDA_STATE_RESET

Reset IRDA handle gstate & RxState.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 351 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_FLUSH_DRREGISTER

#define __HAL_IRDA_FLUSH_DRREGISTER ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
((__HANDLE__)->Instance->DR)

Flush the IRDA DR register.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 363 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_GET_FLAG

#define __HAL_IRDA_GET_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_irda.h>

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

Check whether the specified IRDA flag is set or not.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
__FLAG__specifies the flag to check. This parameter can be one of the following values:
  • IRDA_FLAG_TXE: Transmit data register empty flag
  • IRDA_FLAG_TC: Transmission Complete flag
  • IRDA_FLAG_RXNE: Receive data register not empty flag
  • IRDA_FLAG_IDLE: Idle Line detection flag
  • IRDA_FLAG_ORE: OverRun Error flag
  • IRDA_FLAG_NE: Noise Error flag
  • IRDA_FLAG_FE: Framing Error flag
  • IRDA_FLAG_PE: Parity Error flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 381 of file stm32f4xx_hal_irda.h.

Referenced by IRDA_WaitOnFlagUntilTimeout().

◆ __HAL_IRDA_CLEAR_FLAG

#define __HAL_IRDA_CLEAR_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_irda.h>

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

Clear the specified IRDA pending flag.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
__FLAG__specifies the flag to check. This parameter can be any combination of the following values:
  • IRDA_FLAG_TC: Transmission Complete flag.
  • IRDA_FLAG_RXNE: Receive data register not empty flag.
Note
PE (Parity error), FE (Framing error), NE (Noise error), ORE (OverRun error) and IDLE (Idle line detected) flags are cleared by software sequence: a read operation to USART_SR register followed by a read operation to USART_DR register.
RXNE flag can be also cleared by a read to the USART_DR register.
TC flag can be also cleared by software sequence: a read operation to USART_SR register followed by a write operation to USART_DR register.
TXE flag is cleared only by a write to the USART_DR register.
Return values
None

Definition at line 402 of file stm32f4xx_hal_irda.h.

Referenced by HAL_IRDA_Transmit_DMA().

◆ __HAL_IRDA_CLEAR_PEFLAG

#define __HAL_IRDA_CLEAR_PEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

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

Clear the IRDA PE pending flag.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 410 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_CLEAR_FEFLAG

#define __HAL_IRDA_CLEAR_FEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
#define __HAL_IRDA_CLEAR_PEFLAG(__HANDLE__)
Clear the IRDA PE pending flag.

Clear the IRDA FE pending flag.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 424 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_CLEAR_NEFLAG

#define __HAL_IRDA_CLEAR_NEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:

Clear the IRDA NE pending flag.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 432 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_CLEAR_OREFLAG

#define __HAL_IRDA_CLEAR_OREFLAG ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:

Clear the IRDA ORE pending flag.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 440 of file stm32f4xx_hal_irda.h.

Referenced by HAL_IRDA_DMAResume(), and HAL_IRDA_Receive_DMA().

◆ __HAL_IRDA_CLEAR_IDLEFLAG

#define __HAL_IRDA_CLEAR_IDLEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:

Clear the IRDA IDLE pending flag.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 448 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_ENABLE_IT

#define __HAL_IRDA_ENABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_irda.h>

Value:
((((__INTERRUPT__) >> 28U) == IRDA_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 |= ((__INTERRUPT__) & IRDA_IT_MASK)): \
(((__INTERRUPT__) >> 28U) == IRDA_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 |= ((__INTERRUPT__) & IRDA_IT_MASK)): \
((__HANDLE__)->Instance->CR3 |= ((__INTERRUPT__) & IRDA_IT_MASK)))
#define IRDA_IT_MASK
IRDA interruptions flag mask.
#define IRDA_CR2_REG_INDEX
#define IRDA_CR1_REG_INDEX

Enable the specified IRDA interrupt.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
__INTERRUPT__specifies the IRDA interrupt source to enable. This parameter can be one of the following values:
  • IRDA_IT_TXE: Transmit Data Register empty interrupt
  • IRDA_IT_TC: Transmission complete interrupt
  • IRDA_IT_RXNE: Receive Data register not empty interrupt
  • IRDA_IT_IDLE: Idle line detection interrupt
  • IRDA_IT_PE: Parity Error interrupt
  • IRDA_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
Return values
None

Definition at line 464 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_DISABLE_IT

#define __HAL_IRDA_DISABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_irda.h>

Value:
((((__INTERRUPT__) >> 28U) == IRDA_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 &= ~((__INTERRUPT__) & IRDA_IT_MASK)): \
(((__INTERRUPT__) >> 28U) == IRDA_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 &= ~((__INTERRUPT__) & IRDA_IT_MASK)): \
((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & IRDA_IT_MASK)))

Disable the specified IRDA interrupt.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
__INTERRUPT__specifies the IRDA interrupt source to disable. This parameter can be one of the following values:
  • IRDA_IT_TXE: Transmit Data Register empty interrupt
  • IRDA_IT_TC: Transmission complete interrupt
  • IRDA_IT_RXNE: Receive Data register not empty interrupt
  • IRDA_IT_IDLE: Idle line detection interrupt
  • IRDA_IT_PE: Parity Error interrupt
  • IRDA_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
Return values
None

Definition at line 481 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_GET_IT_SOURCE

#define __HAL_IRDA_GET_IT_SOURCE ( __HANDLE__,
__IT__ )

#include <stm32f4xx_hal_irda.h>

Value:
(((((__IT__) >> 28U) == IRDA_CR1_REG_INDEX)? (__HANDLE__)->Instance->CR1:(((((uint32_t)(__IT__)) >> 28U) == IRDA_CR2_REG_INDEX)? \
(__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & (((uint32_t)(__IT__)) & IRDA_IT_MASK))

Check whether the specified IRDA interrupt has occurred or not.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
__IT__specifies the IRDA interrupt source to check. This parameter can be one of the following values:
  • IRDA_IT_TXE: Transmit Data Register empty interrupt
  • IRDA_IT_TC: Transmission complete interrupt
  • IRDA_IT_RXNE: Receive Data register not empty interrupt
  • IRDA_IT_IDLE: Idle line detection interrupt
  • IRDA_IT_ERR: Error interrupt
  • IRDA_IT_PE: Parity Error interrupt
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 499 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_ONE_BIT_SAMPLE_ENABLE

#define __HAL_IRDA_ONE_BIT_SAMPLE_ENABLE ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
((__HANDLE__)->Instance->CR3 |= USART_CR3_ONEBIT)

Macro to enable the IRDA's one bit sample method.

Parameters
__HANDLE__specifies the IRDA Handle.
Return values
None

Definition at line 506 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_ONE_BIT_SAMPLE_DISABLE

#define __HAL_IRDA_ONE_BIT_SAMPLE_DISABLE ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT))

Macro to disable the IRDA's one bit sample method.

Parameters
__HANDLE__specifies the IRDA Handle.
Return values
None

Definition at line 512 of file stm32f4xx_hal_irda.h.

◆ __HAL_IRDA_ENABLE

#define __HAL_IRDA_ENABLE ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
(SET_BIT((__HANDLE__)->Instance->CR1, USART_CR1_UE))

Enable UART/USART associated to IRDA Handle.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 520 of file stm32f4xx_hal_irda.h.

Referenced by HAL_IRDA_Init().

◆ __HAL_IRDA_DISABLE

#define __HAL_IRDA_DISABLE ( __HANDLE__)

#include <stm32f4xx_hal_irda.h>

Value:
(CLEAR_BIT((__HANDLE__)->Instance->CR1, USART_CR1_UE))

Disable UART/USART associated to IRDA Handle.

Parameters
__HANDLE__specifies the IRDA Handle. IRDA Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
Return values
None

Definition at line 528 of file stm32f4xx_hal_irda.h.

Referenced by HAL_IRDA_DeInit(), and HAL_IRDA_Init().