Macros
USART Private Macros
Collaboration diagram for USART Private Macros:

Macros

#define IS_USART_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) <= 27000000U)
 Check USART Baud rate. More...
 
#define IS_USART_CLOCK(__CLOCK__)
 Ensure that USART clock state is valid. More...
 
#define IS_USART_LASTBIT(__LASTBIT__)
 Ensure that USART frame last bit clock pulse setting is valid. More...
 
#define IS_USART_MODE(__MODE__)   ((((__MODE__) & 0xFFFFFFF3U) == 0x00U) && ((__MODE__) != 0x00U))
 Ensure that USART communication mode is valid. More...
 
#define IS_USART_OVERSAMPLING(__SAMPLING__)
 Ensure that USART oversampling is valid. More...
 
#define IS_USART_PARITY(__PARITY__)
 Ensure that USART frame parity is valid. More...
 
#define IS_USART_PHASE(__CPHA__)   (((__CPHA__) == USART_PHASE_1EDGE) || ((__CPHA__) == USART_PHASE_2EDGE))
 Ensure that USART frame phase is valid. More...
 
#define IS_USART_POLARITY(__CPOL__)   (((__CPOL__) == USART_POLARITY_LOW) || ((__CPOL__) == USART_POLARITY_HIGH))
 Ensure that USART frame polarity is valid. More...
 
#define IS_USART_REQUEST_PARAMETER(__PARAM__)
 Ensure that USART request parameter is valid. More...
 
#define IS_USART_STOPBITS(__STOPBITS__)
 Ensure that USART frame number of stop bits is valid. More...
 
#define USART_DIV_SAMPLING8(__PCLK__, __BAUD__)   ((((__PCLK__)*2U) + ((__BAUD__)/2U)) / (__BAUD__))
 BRR division operation to set BRR register in 8-bit oversampling mode. More...
 
#define USART_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__)
 Report the USART clock source. More...
 

Detailed Description

Macro Definition Documentation

◆ IS_USART_BAUDRATE

#define IS_USART_BAUDRATE (   __BAUDRATE__)    ((__BAUDRATE__) <= 27000000U)

Check USART Baud rate.

Parameters
<strong>BAUDRATE</strong>Baudrate specified by the user. The maximum Baud Rate is derived from the maximum clock on F7 (i.e. 216 MHz) divided by the smallest oversampling used on the USART (i.e. 8)
Return values
SET(BAUDRATE is valid) or RESET (BAUDRATE is invalid)

Definition at line 703 of file stm32f7xx_hal_usart.h.

◆ IS_USART_CLOCK

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

Ensure that USART clock state is valid.

Parameters
<strong>CLOCK</strong>USART clock state.
Return values
SET(CLOCK is valid) or RESET (CLOCK is invalid)

Definition at line 744 of file stm32f7xx_hal_usart.h.

◆ IS_USART_LASTBIT

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

Ensure that USART frame last bit clock pulse setting is valid.

Parameters
<strong>LASTBIT</strong>USART frame last bit clock pulse setting.
Return values
SET(LASTBIT is valid) or RESET (LASTBIT is invalid)

Definition at line 766 of file stm32f7xx_hal_usart.h.

◆ IS_USART_MODE

#define IS_USART_MODE (   __MODE__)    ((((__MODE__) & 0xFFFFFFF3U) == 0x00U) && ((__MODE__) != 0x00U))

Ensure that USART communication mode is valid.

Parameters
<strong>MODE</strong>USART communication mode.
Return values
SET(MODE is valid) or RESET (MODE is invalid)

Definition at line 729 of file stm32f7xx_hal_usart.h.

◆ IS_USART_OVERSAMPLING

#define IS_USART_OVERSAMPLING (   __SAMPLING__)
Value:
(((__SAMPLING__) == USART_OVERSAMPLING_16) || \
((__SAMPLING__) == USART_OVERSAMPLING_8))

Ensure that USART oversampling is valid.

Parameters
<strong>SAMPLING</strong>USART oversampling.
Return values
SET(SAMPLING is valid) or RESET (SAMPLING is invalid)

Definition at line 736 of file stm32f7xx_hal_usart.h.

◆ IS_USART_PARITY

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

Ensure that USART frame parity is valid.

Parameters
<strong>PARITY</strong>USART frame parity.
Return values
SET(PARITY is valid) or RESET (PARITY is invalid)

Definition at line 720 of file stm32f7xx_hal_usart.h.

◆ IS_USART_PHASE

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

Ensure that USART frame phase is valid.

Parameters
<strong>CPHA</strong>USART frame phase.
Return values
SET(CPHA is valid) or RESET (CPHA is invalid)

Definition at line 759 of file stm32f7xx_hal_usart.h.

◆ IS_USART_POLARITY

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

Ensure that USART frame polarity is valid.

Parameters
<strong>CPOL</strong>USART frame polarity.
Return values
SET(CPOL is valid) or RESET (CPOL is invalid)

Definition at line 752 of file stm32f7xx_hal_usart.h.

◆ IS_USART_REQUEST_PARAMETER

#define IS_USART_REQUEST_PARAMETER (   __PARAM__)
Value:
(((__PARAM__) == USART_RXDATA_FLUSH_REQUEST) || \
((__PARAM__) == USART_TXDATA_FLUSH_REQUEST))

Ensure that USART request parameter is valid.

Parameters
<strong>PARAM</strong>USART request parameter.
Return values
SET(PARAM is valid) or RESET (PARAM is invalid)

Definition at line 774 of file stm32f7xx_hal_usart.h.

◆ IS_USART_STOPBITS

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

Ensure that USART frame number of stop bits is valid.

Parameters
<strong>STOPBITS</strong>USART frame number of stop bits.
Return values
SET(STOPBITS is valid) or RESET (STOPBITS is invalid)

Definition at line 710 of file stm32f7xx_hal_usart.h.

◆ USART_DIV_SAMPLING8

#define USART_DIV_SAMPLING8 (   __PCLK__,
  __BAUD__ 
)    ((((__PCLK__)*2U) + ((__BAUD__)/2U)) / (__BAUD__))

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

Parameters
<strong>PCLK</strong>USART clock.
<strong>BAUD</strong>Baud rate set by the user.
Return values
Divisionresult

Definition at line 599 of file stm32f7xx_hal_usart.h.

◆ USART_GETCLOCKSOURCE

#define USART_GETCLOCKSOURCE (   __HANDLE__,
  __CLOCKSOURCE__ 
)

Report the USART clock source.

Parameters
<strong>HANDLE</strong>specifies the USART Handle.
<strong>CLOCKSOURCE</strong>output variable.
Return values
theUSART clocking source, written in CLOCKSOURCE.

Definition at line 606 of file stm32f7xx_hal_usart.h.

USART_OVERSAMPLING_8
#define USART_OVERSAMPLING_8
Definition: stm32f7xx_hal_usart.h:252
USART_PARITY_ODD
#define USART_PARITY_ODD
Definition: stm32f7xx_hal_usart.h:233
USART_STOPBITS_1_5
#define USART_STOPBITS_1_5
Definition: stm32f7xx_hal_usart.h:222
USART_STOPBITS_0_5
#define USART_STOPBITS_0_5
Definition: stm32f7xx_hal_usart.h:220
USART_PARITY_EVEN
#define USART_PARITY_EVEN
Definition: stm32f7xx_hal_usart.h:232
USART_OVERSAMPLING_16
#define USART_OVERSAMPLING_16
Definition: stm32f7xx_hal_usart.h:251
USART_RXDATA_FLUSH_REQUEST
#define USART_RXDATA_FLUSH_REQUEST
Definition: stm32f7xx_hal_usart.h:297
USART_STOPBITS_1
#define USART_STOPBITS_1
Definition: stm32f7xx_hal_usart.h:221
USART_LASTBIT_DISABLE
#define USART_LASTBIT_DISABLE
Definition: stm32f7xx_hal_usart.h:287
USART_CLOCK_ENABLE
#define USART_CLOCK_ENABLE
Definition: stm32f7xx_hal_usart.h:261
USART_STOPBITS_2
#define USART_STOPBITS_2
Definition: stm32f7xx_hal_usart.h:223
USART_PARITY_NONE
#define USART_PARITY_NONE
Definition: stm32f7xx_hal_usart.h:231
USART_TXDATA_FLUSH_REQUEST
#define USART_TXDATA_FLUSH_REQUEST
Definition: stm32f7xx_hal_usart.h:298
USART_CLOCK_DISABLE
#define USART_CLOCK_DISABLE
Definition: stm32f7xx_hal_usart.h:260
USART_LASTBIT_ENABLE
#define USART_LASTBIT_ENABLE
Definition: stm32f7xx_hal_usart.h:288


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:08