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

Macros

#define IS_USART_NACK_STATE(NACK)
 
#define IS_USART_LASTBIT(LASTBIT)
 
#define IS_USART_PHASE(CPHA)
 
#define IS_USART_POLARITY(CPOL)
 
#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)
 
#define IS_USART_BAUDRATE(BAUDRATE)
 
#define USART_DIV(_PCLK_, _BAUD_)
 
#define USART_DIVMANT(_PCLK_, _BAUD_)
 
#define USART_DIVFRAQ(_PCLK_, _BAUD_)
 
#define USART_BRR(_PCLK_, _BAUD_)
 

Detailed Description

Macro Definition Documentation

◆ IS_USART_NACK_STATE

#define IS_USART_NACK_STATE ( NACK)

#include <stm32f4xx_hal_usart.h>

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

Definition at line 579 of file stm32f4xx_hal_usart.h.

◆ IS_USART_LASTBIT

#define IS_USART_LASTBIT ( LASTBIT)

#include <stm32f4xx_hal_usart.h>

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

Definition at line 582 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_PHASE

#define IS_USART_PHASE ( CPHA)

#include <stm32f4xx_hal_usart.h>

Value:
(((CPHA) == USART_PHASE_1EDGE) || \
((CPHA) == USART_PHASE_2EDGE))
#define USART_PHASE_2EDGE
#define USART_PHASE_1EDGE

Definition at line 585 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_POLARITY

#define IS_USART_POLARITY ( CPOL)

#include <stm32f4xx_hal_usart.h>

Value:
(((CPOL) == USART_POLARITY_LOW) || \
((CPOL) == USART_POLARITY_HIGH))
#define USART_POLARITY_HIGH
#define USART_POLARITY_LOW

Definition at line 588 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_CLOCK

#define IS_USART_CLOCK ( CLOCK)

#include <stm32f4xx_hal_usart.h>

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

Definition at line 591 of file stm32f4xx_hal_usart.h.

◆ IS_USART_WORD_LENGTH

#define IS_USART_WORD_LENGTH ( LENGTH)

#include <stm32f4xx_hal_usart.h>

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

Definition at line 594 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_STOPBITS

#define IS_USART_STOPBITS ( STOPBITS)

#include <stm32f4xx_hal_usart.h>

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

Definition at line 597 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_PARITY

#define IS_USART_PARITY ( PARITY)

#include <stm32f4xx_hal_usart.h>

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

Definition at line 602 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_MODE

#define IS_USART_MODE ( MODE)

#include <stm32f4xx_hal_usart.h>

Value:
((((MODE) & (~((uint32_t)USART_MODE_TX_RX))) == 0x00U) && ((MODE) != 0x00U))
#define USART_MODE_TX_RX

Definition at line 606 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ IS_USART_BAUDRATE

#define IS_USART_BAUDRATE ( BAUDRATE)

#include <stm32f4xx_hal_usart.h>

Value:
((BAUDRATE) <= 12500000U)

Definition at line 608 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().

◆ USART_DIV

#define USART_DIV ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_usart.h>

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

Definition at line 610 of file stm32f4xx_hal_usart.h.

◆ USART_DIVMANT

#define USART_DIVMANT ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_usart.h>

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

Definition at line 612 of file stm32f4xx_hal_usart.h.

◆ USART_DIVFRAQ

#define USART_DIVFRAQ ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_usart.h>

Value:
((((USART_DIV((_PCLK_), (_BAUD_)) - (USART_DIVMANT((_PCLK_), (_BAUD_)) * 100U)) * 8U) + 50U) / 100U)
#define USART_DIVMANT(_PCLK_, _BAUD_)

Definition at line 614 of file stm32f4xx_hal_usart.h.

◆ USART_BRR

#define USART_BRR ( _PCLK_,
_BAUD_ )

#include <stm32f4xx_hal_usart.h>

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

Definition at line 619 of file stm32f4xx_hal_usart.h.

Referenced by USART_SetConfig().