STM32L486xx HAL User Manual
Defines
IRDA Private Macros
IRDA

Defines

#define IRDA_DIV_SAMPLING16(__PCLK__, __BAUD__)   (((__PCLK__) + ((__BAUD__)/2U)) / (__BAUD__))
 BRR division operation to set BRR register in 16-bit oversampling mode.
#define IRDA_MASK_COMPUTATION(__HANDLE__)
 Compute the mask to apply to retrieve the received data according to the word length and to the parity bits activation.
#define IS_IRDA_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) < 115201)
 Ensure that IRDA Baud rate is less or equal to maximum value.
#define IS_IRDA_PRESCALER(__PRESCALER__)   ((__PRESCALER__) > 0)
 Ensure that IRDA prescaler value is strictly larger than 0.
#define IS_IRDA_WORD_LENGTH(__LENGTH__)
 Ensure that IRDA frame length is valid.
#define IS_IRDA_PARITY(__PARITY__)
 Ensure that IRDA frame parity is valid.
#define IS_IRDA_TX_RX_MODE(__MODE__)   ((((__MODE__) & (~((uint32_t)(IRDA_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
 Ensure that IRDA communication mode is valid.
#define IS_IRDA_POWERMODE(__MODE__)
 Ensure that IRDA power mode is valid.
#define IS_IRDA_STATE(__STATE__)
 Ensure that IRDA state is valid.
#define IS_IRDA_MODE(__MODE__)
 Ensure that IRDA associated UART/USART mode is valid.
#define IS_IRDA_ONE_BIT_SAMPLE(__ONEBIT__)
 Ensure that IRDA sampling rate is valid.
#define IS_IRDA_DMA_TX(__DMATX__)
 Ensure that IRDA DMA TX mode is valid.
#define IS_IRDA_DMA_RX(__DMARX__)
 Ensure that IRDA DMA RX mode is valid.
#define IS_IRDA_REQUEST_PARAMETER(__PARAM__)
 Ensure that IRDA request is valid.

Define Documentation

#define IRDA_DIV_SAMPLING16 (   __PCLK__,
  __BAUD__ 
)    (((__PCLK__) + ((__BAUD__)/2U)) / (__BAUD__))

BRR division operation to set BRR register in 16-bit oversampling mode.

Parameters:
__PCLK__IRDA clock source.
__BAUD__Baud rate set by the user.
Return values:
Divisionresult

Definition at line 253 of file stm32l4xx_hal_irda.c.

Referenced by IRDA_SetConfig().

#define IRDA_MASK_COMPUTATION (   __HANDLE__)

Compute the mask to apply to retrieve the received data according to the word length and to the parity bits activation.

Parameters:
__HANDLE__specifies the IRDA Handle.
Return values:
None,themask to apply to the associated UART RDR register is stored in (__HANDLE__)->Mask field.

Definition at line 731 of file stm32l4xx_hal_irda.h.

Referenced by HAL_IRDA_Receive(), and HAL_IRDA_Receive_IT().

#define IS_IRDA_BAUDRATE (   __BAUDRATE__)    ((__BAUDRATE__) < 115201)

Ensure that IRDA Baud rate is less or equal to maximum value.

Parameters:
__BAUDRATE__specifies the IRDA Baudrate set by the user.
Return values:
Trueor False

Definition at line 772 of file stm32l4xx_hal_irda.h.

Referenced by IRDA_SetConfig().

#define IS_IRDA_DMA_RX (   __DMARX__)
Value:
(((__DMARX__) == IRDA_DMA_RX_DISABLE) || \
                                   ((__DMARX__) == IRDA_DMA_RX_ENABLE))

Ensure that IRDA DMA RX mode is valid.

Parameters:
__DMARX__IRDA DMA RX mode.
Return values:
SET(__DMARX__ is valid) or RESET (__DMARX__ is invalid)

Definition at line 870 of file stm32l4xx_hal_irda.h.

#define IS_IRDA_DMA_TX (   __DMATX__)
Value:
(((__DMATX__) == IRDA_DMA_TX_DISABLE) || \
                                       ((__DMATX__) == IRDA_DMA_TX_ENABLE))

Ensure that IRDA DMA TX mode is valid.

Parameters:
__DMATX__IRDA DMA TX mode.
Return values:
SET(__DMATX__ is valid) or RESET (__DMATX__ is invalid)

Definition at line 862 of file stm32l4xx_hal_irda.h.

#define IS_IRDA_MODE (   __MODE__)
Value:
(((__MODE__) == IRDA_MODE_DISABLE) || \
                                 ((__MODE__) == IRDA_MODE_ENABLE))

Ensure that IRDA associated UART/USART mode is valid.

Parameters:
__MODE__IRDA associated UART/USART mode.
Return values:
SET(__MODE__ is valid) or RESET (__MODE__ is invalid)

Definition at line 846 of file stm32l4xx_hal_irda.h.

#define IS_IRDA_ONE_BIT_SAMPLE (   __ONEBIT__)
Value:
(((__ONEBIT__) == IRDA_ONE_BIT_SAMPLE_DISABLE) || \
                                                 ((__ONEBIT__) == IRDA_ONE_BIT_SAMPLE_ENABLE))

Ensure that IRDA sampling rate is valid.

Parameters:
__ONEBIT__IRDA sampling rate.
Return values:
SET(__ONEBIT__ is valid) or RESET (__ONEBIT__ is invalid)

Definition at line 854 of file stm32l4xx_hal_irda.h.

#define IS_IRDA_PARITY (   __PARITY__)
Value:
(((__PARITY__) == IRDA_PARITY_NONE) || \
                                    ((__PARITY__) == IRDA_PARITY_EVEN) || \
                                    ((__PARITY__) == IRDA_PARITY_ODD))

Ensure that IRDA frame parity is valid.

Parameters:
__PARITY__IRDA frame parity.
Return values:
SET(__PARITY__ is valid) or RESET (__PARITY__ is invalid)

Definition at line 794 of file stm32l4xx_hal_irda.h.

Referenced by IRDA_SetConfig().

#define IS_IRDA_POWERMODE (   __MODE__)
Value:
(((__MODE__) == IRDA_POWERMODE_LOWPOWER) || \
                                     ((__MODE__) == IRDA_POWERMODE_NORMAL))

Ensure that IRDA power mode is valid.

Parameters:
__MODE__IRDA power mode.
Return values:
SET(__MODE__ is valid) or RESET (__MODE__ is invalid)

Definition at line 810 of file stm32l4xx_hal_irda.h.

Referenced by IRDA_SetConfig().

#define IS_IRDA_PRESCALER (   __PRESCALER__)    ((__PRESCALER__) > 0)

Ensure that IRDA prescaler value is strictly larger than 0.

Parameters:
__PRESCALER__specifies the IRDA prescaler value set by the user.
Return values:
Trueor False

Definition at line 778 of file stm32l4xx_hal_irda.h.

Referenced by IRDA_SetConfig().

#define IS_IRDA_REQUEST_PARAMETER (   __PARAM__)
Value:
(((__PARAM__) == IRDA_AUTOBAUD_REQUEST) || \
                                              ((__PARAM__) == IRDA_RXDATA_FLUSH_REQUEST) || \
                                              ((__PARAM__) == IRDA_TXDATA_FLUSH_REQUEST))

Ensure that IRDA request is valid.

Parameters:
__PARAM__IRDA request.
Return values:
SET(__PARAM__ is valid) or RESET (__PARAM__ is invalid)

Definition at line 878 of file stm32l4xx_hal_irda.h.

#define IS_IRDA_STATE (   __STATE__)
Value:
(((__STATE__) == IRDA_STATE_DISABLE) || \
                                  ((__STATE__) == IRDA_STATE_ENABLE))

Ensure that IRDA state is valid.

Parameters:
__STATE__IRDA state mode.
Return values:
SET(__STATE__ is valid) or RESET (__STATE__ is invalid)

Definition at line 838 of file stm32l4xx_hal_irda.h.

#define IS_IRDA_TX_RX_MODE (   __MODE__)    ((((__MODE__) & (~((uint32_t)(IRDA_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))

Ensure that IRDA communication mode is valid.

Parameters:
__MODE__IRDA communication mode.
Return values:
SET(__MODE__ is valid) or RESET (__MODE__ is invalid)

Definition at line 803 of file stm32l4xx_hal_irda.h.

Referenced by IRDA_SetConfig().

#define IS_IRDA_WORD_LENGTH (   __LENGTH__)
Value:
(((__LENGTH__) == IRDA_WORDLENGTH_7B) || \
                                         ((__LENGTH__) == IRDA_WORDLENGTH_8B) || \
                                         ((__LENGTH__) == IRDA_WORDLENGTH_9B))

Ensure that IRDA frame length is valid.

Parameters:
__LENGTH__IRDA frame length.
Return values:
SET(__LENGTH__ is valid) or RESET (__LENGTH__ is invalid)

Definition at line 785 of file stm32l4xx_hal_irda.h.

Referenced by IRDA_SetConfig().