Header file of USART HAL module. More...
Go to the source code of this file.
Classes | |
struct | __USART_HandleTypeDef |
USART handle Structure definition. More... | |
struct | USART_InitTypeDef |
USART Init Structure definition. More... | |
Macros | |
#define | __HAL_USART_CLEAR_FEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_FEF) |
Clear the USART FE pending flag. More... | |
#define | __HAL_USART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__)) |
Clear the specified USART pending flag. More... | |
#define | __HAL_USART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_IDLEF) |
Clear the USART IDLE pending flag. More... | |
#define | __HAL_USART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__)) |
Clear the specified USART ISR flag, in setting the proper ICR register flag. More... | |
#define | __HAL_USART_CLEAR_NEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_NEF) |
Clear the USART NE pending flag. More... | |
#define | __HAL_USART_CLEAR_OREFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_OREF) |
Clear the USART ORE pending flag. More... | |
#define | __HAL_USART_CLEAR_PEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_PEF) |
Clear the USART PE pending flag. More... | |
#define | __HAL_USART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE) |
Disable USART. More... | |
#define | __HAL_USART_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the specified USART interrupt. More... | |
#define | __HAL_USART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE) |
Enable USART. More... | |
#define | __HAL_USART_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable the specified USART interrupt. More... | |
#define | __HAL_USART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__)) |
Check whether the specified USART flag is set or not. More... | |
#define | __HAL_USART_GET_IT(__HANDLE__, __INTERRUPT__) |
Check whether the specified USART interrupt has occurred or not. More... | |
#define | __HAL_USART_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) |
Check whether the specified USART interrupt source is enabled or not. More... | |
#define | __HAL_USART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT) |
Disable the USART one bit sample method. More... | |
#define | __HAL_USART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT) |
Enable the USART one bit sample method. More... | |
#define | __HAL_USART_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_USART_STATE_RESET) |
Reset USART handle state. More... | |
#define | __HAL_USART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__)) |
Set a specific USART request flag. More... | |
#define | HAL_USART_ERROR_DMA ((uint32_t)0x00000010U) |
#define | HAL_USART_ERROR_FE ((uint32_t)0x00000004U) |
#define | HAL_USART_ERROR_NE ((uint32_t)0x00000002U) |
#define | HAL_USART_ERROR_NONE ((uint32_t)0x00000000U) |
#define | HAL_USART_ERROR_ORE ((uint32_t)0x00000008U) |
#define | HAL_USART_ERROR_PE ((uint32_t)0x00000001U) |
#define | HAL_USART_ERROR_RTO ((uint32_t)0x00000080U) |
#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_CLEAR_FEF USART_ICR_FECF |
#define | USART_CLEAR_IDLEF USART_ICR_IDLECF |
#define | USART_CLEAR_NEF USART_ICR_NCF |
#define | USART_CLEAR_OREF USART_ICR_ORECF |
#define | USART_CLEAR_PEF USART_ICR_PECF |
#define | USART_CLEAR_RTOF USART_ICR_RTOCF |
#define | USART_CLEAR_TCF USART_ICR_TCCF |
#define | USART_CLOCK_DISABLE 0x00000000U |
#define | USART_CLOCK_ENABLE USART_CR2_CLKEN |
#define | USART_CR_MASK 0x00E0U |
#define | USART_CR_POS 5U |
#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_FLAG_BUSY USART_ISR_BUSY |
#define | USART_FLAG_FE USART_ISR_FE |
#define | USART_FLAG_IDLE USART_ISR_IDLE |
#define | USART_FLAG_NE USART_ISR_NE |
#define | USART_FLAG_ORE USART_ISR_ORE |
#define | USART_FLAG_PE USART_ISR_PE |
#define | USART_FLAG_REACK USART_ISR_REACK |
#define | USART_FLAG_RTOF USART_ISR_RTOF |
#define | USART_FLAG_RXNE USART_ISR_RXNE |
#define | USART_FLAG_TC USART_ISR_TC |
#define | USART_FLAG_TEACK USART_ISR_TEACK |
#define | USART_FLAG_TXE USART_ISR_TXE |
#define | USART_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__) |
Report the USART clock source. More... | |
#define | USART_ISR_MASK 0x1F00U |
#define | USART_ISR_POS 8U |
#define | USART_IT_ERR 0x0060U |
#define | USART_IT_FE 0x0100U |
#define | USART_IT_IDLE 0x0424U |
#define | USART_IT_MASK 0x001FU |
#define | USART_IT_NE 0x0200U |
#define | USART_IT_ORE 0x0300U |
#define | USART_IT_PE 0x0028U |
#define | USART_IT_RXNE 0x0525U |
#define | USART_IT_TC 0x0626U |
#define | USART_IT_TXE 0x0727U |
#define | USART_LASTBIT_DISABLE 0x00000000U |
#define | USART_LASTBIT_ENABLE USART_CR2_LBCL |
#define | USART_MODE_RX USART_CR1_RE |
#define | USART_MODE_TX USART_CR1_TE |
#define | USART_MODE_TX_RX (USART_CR1_TE |USART_CR1_RE) |
#define | USART_OVERSAMPLING_16 0x00000000U |
#define | USART_OVERSAMPLING_8 USART_CR1_OVER8 |
#define | USART_PARITY_EVEN USART_CR1_PCE |
#define | USART_PARITY_NONE 0x00000000U |
#define | USART_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS) |
#define | USART_PHASE_1EDGE 0x00000000U |
#define | USART_PHASE_2EDGE USART_CR2_CPHA |
#define | USART_POLARITY_HIGH USART_CR2_CPOL |
#define | USART_POLARITY_LOW 0x00000000U |
#define | USART_RXDATA_FLUSH_REQUEST USART_RQR_RXFRQ |
#define | USART_STOPBITS_0_5 USART_CR2_STOP_0 |
#define | USART_STOPBITS_1 0x00000000U |
#define | USART_STOPBITS_1_5 (USART_CR2_STOP_0 | USART_CR2_STOP_1) |
#define | USART_STOPBITS_2 USART_CR2_STOP_1 |
#define | USART_TXDATA_FLUSH_REQUEST USART_RQR_TXFRQ |
Typedefs | |
typedef struct __USART_HandleTypeDef | USART_HandleTypeDef |
USART handle Structure definition. More... | |
Enumerations | |
enum | HAL_USART_StateTypeDef { HAL_USART_STATE_RESET = 0x00U, HAL_USART_STATE_READY = 0x01U, HAL_USART_STATE_BUSY = 0x02U, HAL_USART_STATE_BUSY_TX = 0x12U, HAL_USART_STATE_BUSY_RX = 0x22U, HAL_USART_STATE_BUSY_TX_RX = 0x32U, HAL_USART_STATE_TIMEOUT = 0x03U, HAL_USART_STATE_ERROR = 0x04U } |
HAL USART State structures definition. More... | |
enum | USART_ClockSourceTypeDef { USART_CLOCKSOURCE_PCLK1 = 0x00U, USART_CLOCKSOURCE_PCLK2 = 0x01U, USART_CLOCKSOURCE_HSI = 0x02U, USART_CLOCKSOURCE_SYSCLK = 0x04U, USART_CLOCKSOURCE_LSE = 0x08U, USART_CLOCKSOURCE_UNDEFINED = 0x10U } |
USART clock sources definitions. More... | |
Header file of USART HAL module.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file stm32f7xx_hal_usart.h.