STM32F439xx HAL User Manual
Defines
USART Private Macros
USART

Defines

#define IS_USART_NACK_STATE(NACK)
#define IS_USART_LASTBIT(LASTBIT)
#define IS_USART_PHASE(CPHA)   (((CPHA) == USART_PHASE_1EDGE) || ((CPHA) == USART_PHASE_2EDGE))
#define IS_USART_POLARITY(CPOL)   (((CPOL) == USART_POLARITY_LOW) || ((CPOL) == USART_POLARITY_HIGH))
#define IS_USART_CLOCK(CLOCK)
#define IS_USART_WORD_LENGTH(LENGTH)
#define IS_USART_STOPBITS(STOPBITS)
#define IS_USART_PARITY(PARITY)
#define IS_USART_MODE(MODE)   ((((MODE) & 0xFFF3U) == 0x00U) && ((MODE) != 0x00U))
#define IS_USART_BAUDRATE(BAUDRATE)   ((BAUDRATE) < 10500001U)
#define USART_DIV(_PCLK_, _BAUD_)   (((_PCLK_)*25U)/(2U*(_BAUD_)))
#define USART_DIVMANT(_PCLK_, _BAUD_)   (USART_DIV((_PCLK_), (_BAUD_))/100U)
#define USART_DIVFRAQ(_PCLK_, _BAUD_)   (((USART_DIV((_PCLK_), (_BAUD_)) - (USART_DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U + 50U) / 100U)
#define USART_BRR(_PCLK_, _BAUD_)   ((USART_DIVMANT((_PCLK_), (_BAUD_)) << 4U)|(USART_DIVFRAQ((_PCLK_), (_BAUD_)) & 0x0FU))

Define Documentation

#define IS_USART_BAUDRATE (   BAUDRATE)    ((BAUDRATE) < 10500001U)

Definition at line 557 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_CLOCK (   CLOCK)
Value:
(((CLOCK) == USART_CLOCK_DISABLE) || \
                               ((CLOCK) == USART_CLOCK_ENABLE))

Definition at line 545 of file stm32f4xx_hal_usart.h.

#define IS_USART_LASTBIT (   LASTBIT)
Value:
(((LASTBIT) == USART_LASTBIT_DISABLE) || \
                                       ((LASTBIT) == USART_LASTBIT_ENABLE))

Definition at line 541 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_MODE (   MODE)    ((((MODE) & 0xFFF3U) == 0x00U) && ((MODE) != 0x00U))

Definition at line 556 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_NACK_STATE (   NACK)
Value:
(((NACK) == USART_NACK_ENABLE) || \
                                   ((NACK) == USART_NACK_DISABLE))

Definition at line 539 of file stm32f4xx_hal_usart.h.

#define IS_USART_PARITY (   PARITY)
Value:
(((PARITY) == USART_PARITY_NONE) || \
                                     ((PARITY) == USART_PARITY_EVEN) || \
                                     ((PARITY) == USART_PARITY_ODD))

Definition at line 553 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_PHASE (   CPHA)    (((CPHA) == USART_PHASE_1EDGE) || ((CPHA) == USART_PHASE_2EDGE))

Definition at line 543 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_POLARITY (   CPOL)    (((CPOL) == USART_POLARITY_LOW) || ((CPOL) == USART_POLARITY_HIGH))

Definition at line 544 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_STOPBITS (   STOPBITS)
Value:
(((STOPBITS) == USART_STOPBITS_1) || \
                                         ((STOPBITS) == USART_STOPBITS_0_5) || \
                                         ((STOPBITS) == USART_STOPBITS_1_5) || \
                                         ((STOPBITS) == USART_STOPBITS_2))

Definition at line 549 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define IS_USART_WORD_LENGTH (   LENGTH)
Value:
(((LENGTH) == USART_WORDLENGTH_8B) || \
                                          ((LENGTH) == USART_WORDLENGTH_9B))

Definition at line 547 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define USART_BRR (   _PCLK_,
  _BAUD_ 
)    ((USART_DIVMANT((_PCLK_), (_BAUD_)) << 4U)|(USART_DIVFRAQ((_PCLK_), (_BAUD_)) & 0x0FU))

Definition at line 562 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

#define USART_DIV (   _PCLK_,
  _BAUD_ 
)    (((_PCLK_)*25U)/(2U*(_BAUD_)))

Definition at line 559 of file stm32f4xx_hal_usart.h.

#define USART_DIVFRAQ (   _PCLK_,
  _BAUD_ 
)    (((USART_DIV((_PCLK_), (_BAUD_)) - (USART_DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 16U + 50U) / 100U)

Definition at line 561 of file stm32f4xx_hal_usart.h.

#define USART_DIVMANT (   _PCLK_,
  _BAUD_ 
)    (USART_DIV((_PCLK_), (_BAUD_))/100U)

Definition at line 560 of file stm32f4xx_hal_usart.h.