STM32L486xx HAL User Manual
Defines
Exported_Macros_Helper
USART Exported Macros

Defines

#define __LL_USART_DIV_SAMPLING8(__PERIPHCLK__, __BAUDRATE__)   ((((__PERIPHCLK__)*2U) + ((__BAUDRATE__)/2U))/(__BAUDRATE__))
 Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 8 bits sampling mode (32 bits value of USARTDIV is returned)
#define __LL_USART_DIV_SAMPLING16(__PERIPHCLK__, __BAUDRATE__)   (((__PERIPHCLK__) + ((__BAUDRATE__)/2U))/(__BAUDRATE__))
 Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 16 bits sampling mode (32 bits value of USARTDIV is returned)

Define Documentation

#define __LL_USART_DIV_SAMPLING16 (   __PERIPHCLK__,
  __BAUDRATE__ 
)    (((__PERIPHCLK__) + ((__BAUDRATE__)/2U))/(__BAUDRATE__))

Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 16 bits sampling mode (32 bits value of USARTDIV is returned)

Parameters:
__PERIPHCLK__Peripheral Clock frequency used for USART instance
__BAUDRATE__Baud rate value to achieve
Return values:
USARTDIVvalue to be used for BRR register filling in OverSampling_16 case

Definition at line 668 of file stm32l4xx_ll_usart.h.

Referenced by LL_USART_SetBaudRate().

#define __LL_USART_DIV_SAMPLING8 (   __PERIPHCLK__,
  __BAUDRATE__ 
)    ((((__PERIPHCLK__)*2U) + ((__BAUDRATE__)/2U))/(__BAUDRATE__))

Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 8 bits sampling mode (32 bits value of USARTDIV is returned)

Parameters:
__PERIPHCLK__Peripheral Clock frequency used for USART instance
__BAUDRATE__Baud rate value to achieve
Return values:
USARTDIVvalue to be used for BRR register filling in OverSampling_8 case

Definition at line 640 of file stm32l4xx_ll_usart.h.

Referenced by LL_USART_SetBaudRate().