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

Macros

#define IS_UART_WORD_LENGTH(LENGTH)
 
#define IS_UART_LIN_WORD_LENGTH(LENGTH)
 
#define IS_UART_STOPBITS(STOPBITS)
 
#define IS_UART_PARITY(PARITY)
 
#define IS_UART_HARDWARE_FLOW_CONTROL(CONTROL)
 
#define IS_UART_MODE(MODE)
 
#define IS_UART_STATE(STATE)
 
#define IS_UART_OVERSAMPLING(SAMPLING)
 
#define IS_UART_LIN_OVERSAMPLING(SAMPLING)
 
#define IS_UART_LIN_BREAK_DETECT_LENGTH(LENGTH)
 
#define IS_UART_WAKEUPMETHOD(WAKEUP)
 
#define IS_UART_BAUDRATE(BAUDRATE)
 
#define IS_UART_ADDRESS(ADDRESS)
 
#define UART_DIV_SAMPLING16(_PCLK_, _BAUD_)
 
#define UART_DIVMANT_SAMPLING16(_PCLK_, _BAUD_)
 
#define UART_DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_)
 
#define UART_BRR_SAMPLING16(_PCLK_, _BAUD_)
 
#define UART_DIV_SAMPLING8(_PCLK_, _BAUD_)
 
#define UART_DIVMANT_SAMPLING8(_PCLK_, _BAUD_)
 
#define UART_DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_)
 
#define UART_BRR_SAMPLING8(_PCLK_, _BAUD_)
 

Detailed Description

Macro Definition Documentation

◆ IS_UART_WORD_LENGTH

#define IS_UART_WORD_LENGTH ( LENGTH)

#include <stm32f4xx_hal_uart.h>

Value:
(((LENGTH) == UART_WORDLENGTH_8B) || \
((LENGTH) == UART_WORDLENGTH_9B))
#define UART_WORDLENGTH_8B
#define UART_WORDLENGTH_9B

Definition at line 834 of file stm32f4xx_hal_uart.h.

Referenced by HAL_HalfDuplex_Init(), HAL_MultiProcessor_Init(), and HAL_UART_Init().

◆ IS_UART_LIN_WORD_LENGTH

#define IS_UART_LIN_WORD_LENGTH ( LENGTH)

#include <stm32f4xx_hal_uart.h>

Value:
(((LENGTH) == UART_WORDLENGTH_8B))

Definition at line 836 of file stm32f4xx_hal_uart.h.

Referenced by HAL_LIN_Init().

◆ IS_UART_STOPBITS

#define IS_UART_STOPBITS ( STOPBITS)

#include <stm32f4xx_hal_uart.h>

Value:
(((STOPBITS) == UART_STOPBITS_1) || \
((STOPBITS) == UART_STOPBITS_2))
#define UART_STOPBITS_1
#define UART_STOPBITS_2

Definition at line 837 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ IS_UART_PARITY

#define IS_UART_PARITY ( PARITY)

#include <stm32f4xx_hal_uart.h>

Value:
(((PARITY) == UART_PARITY_NONE) || \
((PARITY) == UART_PARITY_EVEN) || \
((PARITY) == UART_PARITY_ODD))
#define UART_PARITY_EVEN
#define UART_PARITY_ODD
#define UART_PARITY_NONE

Definition at line 839 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ IS_UART_HARDWARE_FLOW_CONTROL

#define IS_UART_HARDWARE_FLOW_CONTROL ( CONTROL)

#include <stm32f4xx_hal_uart.h>

Value:
(((CONTROL) == UART_HWCONTROL_NONE) || \
((CONTROL) == UART_HWCONTROL_RTS) || \
((CONTROL) == UART_HWCONTROL_CTS) || \
((CONTROL) == UART_HWCONTROL_RTS_CTS))
#define UART_HWCONTROL_CTS
#define UART_HWCONTROL_RTS
#define UART_HWCONTROL_RTS_CTS
#define UART_HWCONTROL_NONE

Definition at line 842 of file stm32f4xx_hal_uart.h.

Referenced by HAL_UART_Init().

◆ IS_UART_MODE

#define IS_UART_MODE ( MODE)

#include <stm32f4xx_hal_uart.h>

Value:
((((MODE) & 0x0000FFF3U) == 0x00U) && ((MODE) != 0x00U))

Definition at line 847 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ IS_UART_STATE

#define IS_UART_STATE ( STATE)

#include <stm32f4xx_hal_uart.h>

Value:
(((STATE) == UART_STATE_DISABLE) || \
((STATE) == UART_STATE_ENABLE))
#define UART_STATE_ENABLE
#define UART_STATE_DISABLE

Definition at line 848 of file stm32f4xx_hal_uart.h.

◆ IS_UART_OVERSAMPLING

#define IS_UART_OVERSAMPLING ( SAMPLING)

#include <stm32f4xx_hal_uart.h>

Value:
(((SAMPLING) == UART_OVERSAMPLING_16) || \
((SAMPLING) == UART_OVERSAMPLING_8))
#define UART_OVERSAMPLING_16
#define UART_OVERSAMPLING_8

Definition at line 850 of file stm32f4xx_hal_uart.h.

Referenced by HAL_HalfDuplex_Init(), HAL_MultiProcessor_Init(), and HAL_UART_Init().

◆ IS_UART_LIN_OVERSAMPLING

#define IS_UART_LIN_OVERSAMPLING ( SAMPLING)

#include <stm32f4xx_hal_uart.h>

Value:
(((SAMPLING) == UART_OVERSAMPLING_16))

Definition at line 852 of file stm32f4xx_hal_uart.h.

Referenced by HAL_LIN_Init().

◆ IS_UART_LIN_BREAK_DETECT_LENGTH

#define IS_UART_LIN_BREAK_DETECT_LENGTH ( LENGTH)

#include <stm32f4xx_hal_uart.h>

Value:
(((LENGTH) == UART_LINBREAKDETECTLENGTH_10B) || \
#define UART_LINBREAKDETECTLENGTH_10B
#define UART_LINBREAKDETECTLENGTH_11B

Definition at line 853 of file stm32f4xx_hal_uart.h.

Referenced by HAL_LIN_Init().

◆ IS_UART_WAKEUPMETHOD

#define IS_UART_WAKEUPMETHOD ( WAKEUP)

#include <stm32f4xx_hal_uart.h>

Value:
(((WAKEUP) == UART_WAKEUPMETHOD_IDLELINE) || \
#define UART_WAKEUPMETHOD_IDLELINE
#define UART_WAKEUPMETHOD_ADDRESSMARK

Definition at line 855 of file stm32f4xx_hal_uart.h.

Referenced by HAL_MultiProcessor_Init().

◆ IS_UART_BAUDRATE

#define IS_UART_BAUDRATE ( BAUDRATE)

#include <stm32f4xx_hal_uart.h>

Value:
((BAUDRATE) <= 10500000U)

Definition at line 857 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ IS_UART_ADDRESS

#define IS_UART_ADDRESS ( ADDRESS)

#include <stm32f4xx_hal_uart.h>

Value:
((ADDRESS) <= 0x0FU)

Definition at line 858 of file stm32f4xx_hal_uart.h.

Referenced by HAL_MultiProcessor_Init().

◆ UART_DIV_SAMPLING16

#define UART_DIV_SAMPLING16 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
((uint32_t)((((uint64_t)(_PCLK_))*25U)/(4U*((uint64_t)(_BAUD_)))))

Definition at line 860 of file stm32f4xx_hal_uart.h.

◆ UART_DIVMANT_SAMPLING16

#define UART_DIVMANT_SAMPLING16 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
(UART_DIV_SAMPLING16((_PCLK_), (_BAUD_))/100U)
#define UART_DIV_SAMPLING16(_PCLK_, _BAUD_)

Definition at line 861 of file stm32f4xx_hal_uart.h.

◆ UART_DIVFRAQ_SAMPLING16

#define UART_DIVFRAQ_SAMPLING16 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
((((UART_DIV_SAMPLING16((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) * 100U)) * 16U)\
+ 50U) / 100U)
#define UART_DIVMANT_SAMPLING16(_PCLK_, _BAUD_)

Definition at line 862 of file stm32f4xx_hal_uart.h.

◆ UART_BRR_SAMPLING16

#define UART_BRR_SAMPLING16 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
((UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) << 4U) + \
(UART_DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0xF0U) + \
(UART_DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0x0FU))
#define UART_DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_)

Definition at line 866 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ UART_DIV_SAMPLING8

#define UART_DIV_SAMPLING8 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
((uint32_t)((((uint64_t)(_PCLK_))*25U)/(2U*((uint64_t)(_BAUD_)))))

Definition at line 870 of file stm32f4xx_hal_uart.h.

◆ UART_DIVMANT_SAMPLING8

#define UART_DIVMANT_SAMPLING8 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
(UART_DIV_SAMPLING8((_PCLK_), (_BAUD_))/100U)
#define UART_DIV_SAMPLING8(_PCLK_, _BAUD_)

Definition at line 871 of file stm32f4xx_hal_uart.h.

◆ UART_DIVFRAQ_SAMPLING8

#define UART_DIVFRAQ_SAMPLING8 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
((((UART_DIV_SAMPLING8((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) * 100U)) * 8U)\
+ 50U) / 100U)
#define UART_DIVMANT_SAMPLING8(_PCLK_, _BAUD_)

Definition at line 872 of file stm32f4xx_hal_uart.h.

◆ UART_BRR_SAMPLING8

#define UART_BRR_SAMPLING8 ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_uart.h>

Value:
((UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) << 4U) + \
((UART_DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0xF8U) << 1U) + \
(UART_DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0x07U))
#define UART_DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_)

Definition at line 876 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().