|
STM32F4xx HAL Driver master
STM32CubeF4 HAL / LL Drivers API Reference
|
Header file of USART HAL module. More...
#include "stm32f4xx_hal_def.h"Go to the source code of this file.
Classes | |
| struct | USART_InitTypeDef |
| USART Init Structure definition. More... | |
| struct | __USART_HandleTypeDef |
| USART handle Structure definition. More... | |
Macros | |
| #define | HAL_USART_ERROR_NONE 0x00000000U |
| #define | HAL_USART_ERROR_PE 0x00000001U |
| #define | HAL_USART_ERROR_NE 0x00000002U |
| #define | HAL_USART_ERROR_FE 0x00000004U |
| #define | HAL_USART_ERROR_ORE 0x00000008U |
| #define | HAL_USART_ERROR_DMA 0x00000010U |
| #define | USART_WORDLENGTH_8B 0x00000000U |
| #define | USART_WORDLENGTH_9B ((uint32_t)USART_CR1_M) |
| #define | USART_STOPBITS_1 0x00000000U |
| #define | USART_STOPBITS_0_5 ((uint32_t)USART_CR2_STOP_0) |
| #define | USART_STOPBITS_2 ((uint32_t)USART_CR2_STOP_1) |
| #define | USART_STOPBITS_1_5 ((uint32_t)(USART_CR2_STOP_0 | USART_CR2_STOP_1)) |
| #define | USART_PARITY_NONE 0x00000000U |
| #define | USART_PARITY_EVEN ((uint32_t)USART_CR1_PCE) |
| #define | USART_PARITY_ODD ((uint32_t)(USART_CR1_PCE | USART_CR1_PS)) |
| #define | USART_MODE_RX ((uint32_t)USART_CR1_RE) |
| #define | USART_MODE_TX ((uint32_t)USART_CR1_TE) |
| #define | USART_MODE_TX_RX ((uint32_t)(USART_CR1_TE | USART_CR1_RE)) |
| #define | USART_CLOCK_DISABLE 0x00000000U |
| #define | USART_CLOCK_ENABLE ((uint32_t)USART_CR2_CLKEN) |
| #define | USART_POLARITY_LOW 0x00000000U |
| #define | USART_POLARITY_HIGH ((uint32_t)USART_CR2_CPOL) |
| #define | USART_PHASE_1EDGE 0x00000000U |
| #define | USART_PHASE_2EDGE ((uint32_t)USART_CR2_CPHA) |
| #define | USART_LASTBIT_DISABLE 0x00000000U |
| #define | USART_LASTBIT_ENABLE ((uint32_t)USART_CR2_LBCL) |
| #define | USART_NACK_ENABLE ((uint32_t)USART_CR3_NACK) |
| #define | USART_NACK_DISABLE 0x00000000U |
| #define | USART_FLAG_TXE ((uint32_t)USART_SR_TXE) |
| #define | USART_FLAG_TC ((uint32_t)USART_SR_TC) |
| #define | USART_FLAG_RXNE ((uint32_t)USART_SR_RXNE) |
| #define | USART_FLAG_IDLE ((uint32_t)USART_SR_IDLE) |
| #define | USART_FLAG_ORE ((uint32_t)USART_SR_ORE) |
| #define | USART_FLAG_NE ((uint32_t)USART_SR_NE) |
| #define | USART_FLAG_FE ((uint32_t)USART_SR_FE) |
| #define | USART_FLAG_PE ((uint32_t)USART_SR_PE) |
| #define | USART_IT_PE ((uint32_t)(USART_CR1_REG_INDEX << 28U | USART_CR1_PEIE)) |
| #define | USART_IT_TXE ((uint32_t)(USART_CR1_REG_INDEX << 28U | USART_CR1_TXEIE)) |
| #define | USART_IT_TC ((uint32_t)(USART_CR1_REG_INDEX << 28U | USART_CR1_TCIE)) |
| #define | USART_IT_RXNE ((uint32_t)(USART_CR1_REG_INDEX << 28U | USART_CR1_RXNEIE)) |
| #define | USART_IT_IDLE ((uint32_t)(USART_CR1_REG_INDEX << 28U | USART_CR1_IDLEIE)) |
| #define | USART_IT_ERR ((uint32_t)(USART_CR3_REG_INDEX << 28U | USART_CR3_EIE)) |
| #define | __HAL_USART_RESET_HANDLE_STATE(__HANDLE__) |
| Reset USART handle state. | |
| #define | __HAL_USART_GET_FLAG(__HANDLE__, __FLAG__) |
| Check whether the specified USART flag is set or not. | |
| #define | __HAL_USART_CLEAR_FLAG(__HANDLE__, __FLAG__) |
| Clear the specified USART pending flags. | |
| #define | __HAL_USART_CLEAR_PEFLAG(__HANDLE__) |
| Clear the USART PE pending flag. | |
| #define | __HAL_USART_CLEAR_FEFLAG(__HANDLE__) |
| Clear the USART FE pending flag. | |
| #define | __HAL_USART_CLEAR_NEFLAG(__HANDLE__) |
| Clear the USART NE pending flag. | |
| #define | __HAL_USART_CLEAR_OREFLAG(__HANDLE__) |
| Clear the USART ORE pending flag. | |
| #define | __HAL_USART_CLEAR_IDLEFLAG(__HANDLE__) |
| Clear the USART IDLE pending flag. | |
| #define | __HAL_USART_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
| Enables or disables the specified USART interrupts. | |
| #define | __HAL_USART_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
| #define | __HAL_USART_GET_IT_SOURCE(__HANDLE__, __IT__) |
| Checks whether the specified USART interrupt has occurred or not. | |
| #define | __HAL_USART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) |
| Macro to enable the USART's one bit sample method. | |
| #define | __HAL_USART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) |
| Macro to disable the USART's one bit sample method. | |
| #define | __HAL_USART_ENABLE(__HANDLE__) |
| Enable USART. | |
| #define | __HAL_USART_DISABLE(__HANDLE__) |
| Disable USART. | |
| #define | USART_IT_MASK |
| USART interruptions flag mask. | |
| #define | USART_CR1_REG_INDEX 1U |
| #define | USART_CR2_REG_INDEX 2U |
| #define | USART_CR3_REG_INDEX 3U |
| #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_) |
Typedefs | |
| typedef struct __USART_HandleTypeDef | USART_HandleTypeDef |
| USART handle Structure definition. | |
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 State structures definition. More... | |
Header file of USART HAL module.
Copyright (c) 2016 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file stm32f4xx_hal_usart.h.