stm32f4xx_hal_uart.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F4xx_HAL_UART_H
22 #define __STM32F4xx_HAL_UART_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f4xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
47 typedef struct
48 {
49  uint32_t BaudRate;
55  uint32_t WordLength;
58  uint32_t StopBits;
61  uint32_t Parity;
68  uint32_t Mode;
71  uint32_t HwFlowCtl;
74  uint32_t OverSampling;
77 
117 typedef enum
118 {
137 
141 typedef struct __UART_HandleTypeDef
142 {
147  uint8_t *pTxBuffPtr;
149  uint16_t TxXferSize;
151  __IO uint16_t TxXferCount;
153  uint8_t *pRxBuffPtr;
155  uint16_t RxXferSize;
157  __IO uint16_t RxXferCount;
172  __IO uint32_t ErrorCode;
174 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
175  void (* TxHalfCpltCallback)(struct __UART_HandleTypeDef *huart);
176  void (* TxCpltCallback)(struct __UART_HandleTypeDef *huart);
177  void (* RxHalfCpltCallback)(struct __UART_HandleTypeDef *huart);
178  void (* RxCpltCallback)(struct __UART_HandleTypeDef *huart);
179  void (* ErrorCallback)(struct __UART_HandleTypeDef *huart);
180  void (* AbortCpltCallback)(struct __UART_HandleTypeDef *huart);
181  void (* AbortTransmitCpltCallback)(struct __UART_HandleTypeDef *huart);
182  void (* AbortReceiveCpltCallback)(struct __UART_HandleTypeDef *huart);
183  void (* WakeupCallback)(struct __UART_HandleTypeDef *huart);
185  void (* MspInitCallback)(struct __UART_HandleTypeDef *huart);
186  void (* MspDeInitCallback)(struct __UART_HandleTypeDef *huart);
187 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
188 
190 
191 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
192 
195 typedef enum
196 {
197  HAL_UART_TX_HALFCOMPLETE_CB_ID = 0x00U,
198  HAL_UART_TX_COMPLETE_CB_ID = 0x01U,
199  HAL_UART_RX_HALFCOMPLETE_CB_ID = 0x02U,
200  HAL_UART_RX_COMPLETE_CB_ID = 0x03U,
201  HAL_UART_ERROR_CB_ID = 0x04U,
202  HAL_UART_ABORT_COMPLETE_CB_ID = 0x05U,
203  HAL_UART_ABORT_TRANSMIT_COMPLETE_CB_ID = 0x06U,
204  HAL_UART_ABORT_RECEIVE_COMPLETE_CB_ID = 0x07U,
205  HAL_UART_WAKEUP_CB_ID = 0x08U,
207  HAL_UART_MSPINIT_CB_ID = 0x0BU,
208  HAL_UART_MSPDEINIT_CB_ID = 0x0CU
210 } HAL_UART_CallbackIDTypeDef;
211 
215 typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart);
217 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
218 
223 /* Exported constants --------------------------------------------------------*/
231 #define HAL_UART_ERROR_NONE 0x00000000U
232 #define HAL_UART_ERROR_PE 0x00000001U
233 #define HAL_UART_ERROR_NE 0x00000002U
234 #define HAL_UART_ERROR_FE 0x00000004U
235 #define HAL_UART_ERROR_ORE 0x00000008U
236 #define HAL_UART_ERROR_DMA 0x00000010U
237 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
238 #define HAL_UART_ERROR_INVALID_CALLBACK 0x00000020U
239 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
240 
247 #define UART_WORDLENGTH_8B 0x00000000U
248 #define UART_WORDLENGTH_9B ((uint32_t)USART_CR1_M)
249 
256 #define UART_STOPBITS_1 0x00000000U
257 #define UART_STOPBITS_2 ((uint32_t)USART_CR2_STOP_1)
258 
265 #define UART_PARITY_NONE 0x00000000U
266 #define UART_PARITY_EVEN ((uint32_t)USART_CR1_PCE)
267 #define UART_PARITY_ODD ((uint32_t)(USART_CR1_PCE | USART_CR1_PS))
268 
275 #define UART_HWCONTROL_NONE 0x00000000U
276 #define UART_HWCONTROL_RTS ((uint32_t)USART_CR3_RTSE)
277 #define UART_HWCONTROL_CTS ((uint32_t)USART_CR3_CTSE)
278 #define UART_HWCONTROL_RTS_CTS ((uint32_t)(USART_CR3_RTSE | USART_CR3_CTSE))
279 
286 #define UART_MODE_RX ((uint32_t)USART_CR1_RE)
287 #define UART_MODE_TX ((uint32_t)USART_CR1_TE)
288 #define UART_MODE_TX_RX ((uint32_t)(USART_CR1_TE | USART_CR1_RE))
289 
296 #define UART_STATE_DISABLE 0x00000000U
297 #define UART_STATE_ENABLE ((uint32_t)USART_CR1_UE)
298 
305 #define UART_OVERSAMPLING_16 0x00000000U
306 #define UART_OVERSAMPLING_8 ((uint32_t)USART_CR1_OVER8)
307 
314 #define UART_LINBREAKDETECTLENGTH_10B 0x00000000U
315 #define UART_LINBREAKDETECTLENGTH_11B ((uint32_t)USART_CR2_LBDL)
316 
323 #define UART_WAKEUPMETHOD_IDLELINE 0x00000000U
324 #define UART_WAKEUPMETHOD_ADDRESSMARK ((uint32_t)USART_CR1_WAKE)
325 
334 #define UART_FLAG_CTS ((uint32_t)USART_SR_CTS)
335 #define UART_FLAG_LBD ((uint32_t)USART_SR_LBD)
336 #define UART_FLAG_TXE ((uint32_t)USART_SR_TXE)
337 #define UART_FLAG_TC ((uint32_t)USART_SR_TC)
338 #define UART_FLAG_RXNE ((uint32_t)USART_SR_RXNE)
339 #define UART_FLAG_IDLE ((uint32_t)USART_SR_IDLE)
340 #define UART_FLAG_ORE ((uint32_t)USART_SR_ORE)
341 #define UART_FLAG_NE ((uint32_t)USART_SR_NE)
342 #define UART_FLAG_FE ((uint32_t)USART_SR_FE)
343 #define UART_FLAG_PE ((uint32_t)USART_SR_PE)
344 
358 #define UART_IT_PE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_PEIE))
359 #define UART_IT_TXE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_TXEIE))
360 #define UART_IT_TC ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_TCIE))
361 #define UART_IT_RXNE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_RXNEIE))
362 #define UART_IT_IDLE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_IDLEIE))
363 
364 #define UART_IT_LBD ((uint32_t)(UART_CR2_REG_INDEX << 28U | USART_CR2_LBDIE))
365 
366 #define UART_IT_CTS ((uint32_t)(UART_CR3_REG_INDEX << 28U | USART_CR3_CTSIE))
367 #define UART_IT_ERR ((uint32_t)(UART_CR3_REG_INDEX << 28U | USART_CR3_EIE))
368 
376 /* Exported macro ------------------------------------------------------------*/
387 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
388 #define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
389  (__HANDLE__)->gState = HAL_UART_STATE_RESET; \
390  (__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
391  (__HANDLE__)->MspInitCallback = NULL; \
392  (__HANDLE__)->MspDeInitCallback = NULL; \
393  } while(0U)
394 #else
395 #define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
396  (__HANDLE__)->gState = HAL_UART_STATE_RESET; \
397  (__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
398  } while(0U)
399 #endif /*USE_HAL_UART_REGISTER_CALLBACKS */
400 
406 #define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) ((__HANDLE__)->Instance->DR)
407 
426 #define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
427 
450 #define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__))
451 
458 #define __HAL_UART_CLEAR_PEFLAG(__HANDLE__) \
459  do{ \
460  __IO uint32_t tmpreg = 0x00U; \
461  tmpreg = (__HANDLE__)->Instance->SR; \
462  tmpreg = (__HANDLE__)->Instance->DR; \
463  UNUSED(tmpreg); \
464  } while(0U)
465 
472 #define __HAL_UART_CLEAR_FEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
473 
480 #define __HAL_UART_CLEAR_NEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
481 
488 #define __HAL_UART_CLEAR_OREFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
489 
496 #define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
497 
514 #define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((((__INTERRUPT__) >> 28U) == UART_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 |= ((__INTERRUPT__) & UART_IT_MASK)): \
515  (((__INTERRUPT__) >> 28U) == UART_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 |= ((__INTERRUPT__) & UART_IT_MASK)): \
516  ((__HANDLE__)->Instance->CR3 |= ((__INTERRUPT__) & UART_IT_MASK)))
517 
534 #define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((((__INTERRUPT__) >> 28U) == UART_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
535  (((__INTERRUPT__) >> 28U) == UART_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
536  ((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & UART_IT_MASK)))
537 
553 #define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __IT__) (((((__IT__) >> 28U) == UART_CR1_REG_INDEX)? (__HANDLE__)->Instance->CR1:(((((uint32_t)(__IT__)) >> 28U) == UART_CR2_REG_INDEX)? \
554  (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & (((uint32_t)(__IT__)) & UART_IT_MASK))
555 
570 #define __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__) \
571  do{ \
572  SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
573  (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE; \
574  } while(0U)
575 
590 #define __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__) \
591  do{ \
592  CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
593  (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE); \
594  } while(0U)
595 
610 #define __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__) \
611  do{ \
612  SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \
613  (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE; \
614  } while(0U)
615 
630 #define __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__) \
631  do{ \
632  CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\
633  (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE); \
634  } while(0U)
635 
640 #define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
641 
646 #define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT))
647 
652 #define __HAL_UART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
653 
658 #define __HAL_UART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
659 
663 /* Exported functions --------------------------------------------------------*/
672 /* Initialization/de-initialization functions **********************************/
675 HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength);
676 HAL_StatusTypeDef HAL_MultiProcessor_Init(UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod);
680 
681 /* Callbacks Register/UnRegister functions ***********************************/
682 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
683 HAL_StatusTypeDef HAL_UART_RegisterCallback(UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID, pUART_CallbackTypeDef pCallback);
684 HAL_StatusTypeDef HAL_UART_UnRegisterCallback(UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID);
685 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
686 
695 /* IO operation functions *******************************************************/
696 HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
697 HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
698 HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
699 HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
700 HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
701 HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
705 /* Transfer Abort functions */
712 
722 
730 /* Peripheral Control functions ************************************************/
743 /* Peripheral State functions **************************************************/
753 /* Private types -------------------------------------------------------------*/
754 /* Private variables ---------------------------------------------------------*/
755 /* Private constants ---------------------------------------------------------*/
762 #define UART_IT_MASK 0x0000FFFFU
763 
764 #define UART_CR1_REG_INDEX 1U
765 #define UART_CR2_REG_INDEX 2U
766 #define UART_CR3_REG_INDEX 3U
767 
771 /* Private macros ------------------------------------------------------------*/
775 #define IS_UART_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B) || \
776  ((LENGTH) == UART_WORDLENGTH_9B))
777 #define IS_UART_LIN_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B))
778 #define IS_UART_STOPBITS(STOPBITS) (((STOPBITS) == UART_STOPBITS_1) || \
779  ((STOPBITS) == UART_STOPBITS_2))
780 #define IS_UART_PARITY(PARITY) (((PARITY) == UART_PARITY_NONE) || \
781  ((PARITY) == UART_PARITY_EVEN) || \
782  ((PARITY) == UART_PARITY_ODD))
783 #define IS_UART_HARDWARE_FLOW_CONTROL(CONTROL)\
784  (((CONTROL) == UART_HWCONTROL_NONE) || \
785  ((CONTROL) == UART_HWCONTROL_RTS) || \
786  ((CONTROL) == UART_HWCONTROL_CTS) || \
787  ((CONTROL) == UART_HWCONTROL_RTS_CTS))
788 #define IS_UART_MODE(MODE) ((((MODE) & 0x0000FFF3U) == 0x00U) && ((MODE) != 0x00U))
789 #define IS_UART_STATE(STATE) (((STATE) == UART_STATE_DISABLE) || \
790  ((STATE) == UART_STATE_ENABLE))
791 #define IS_UART_OVERSAMPLING(SAMPLING) (((SAMPLING) == UART_OVERSAMPLING_16) || \
792  ((SAMPLING) == UART_OVERSAMPLING_8))
793 #define IS_UART_LIN_OVERSAMPLING(SAMPLING) (((SAMPLING) == UART_OVERSAMPLING_16))
794 #define IS_UART_LIN_BREAK_DETECT_LENGTH(LENGTH) (((LENGTH) == UART_LINBREAKDETECTLENGTH_10B) || \
795  ((LENGTH) == UART_LINBREAKDETECTLENGTH_11B))
796 #define IS_UART_WAKEUPMETHOD(WAKEUP) (((WAKEUP) == UART_WAKEUPMETHOD_IDLELINE) || \
797  ((WAKEUP) == UART_WAKEUPMETHOD_ADDRESSMARK))
798 #define IS_UART_BAUDRATE(BAUDRATE) ((BAUDRATE) <= 10500000U)
799 #define IS_UART_ADDRESS(ADDRESS) ((ADDRESS) <= 0x0FU)
800 
801 #define UART_DIV_SAMPLING16(_PCLK_, _BAUD_) ((uint32_t)((((uint64_t)(_PCLK_))*25U)/(4U*((uint64_t)(_BAUD_)))))
802 #define UART_DIVMANT_SAMPLING16(_PCLK_, _BAUD_) (UART_DIV_SAMPLING16((_PCLK_), (_BAUD_))/100U)
803 #define UART_DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_) ((((UART_DIV_SAMPLING16((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) * 100U)) * 16U) + 50U) / 100U)
804 /* UART BRR = mantissa + overflow + fraction
805  = (UART DIVMANT << 4) + (UART DIVFRAQ & 0xF0) + (UART DIVFRAQ & 0x0FU) */
806 #define UART_BRR_SAMPLING16(_PCLK_, _BAUD_) ((UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) << 4U) + \
807  (UART_DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0xF0U) + \
808  (UART_DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0x0FU))
809 
810 #define UART_DIV_SAMPLING8(_PCLK_, _BAUD_) ((uint32_t)((((uint64_t)(_PCLK_))*25U)/(2U*((uint64_t)(_BAUD_)))))
811 #define UART_DIVMANT_SAMPLING8(_PCLK_, _BAUD_) (UART_DIV_SAMPLING8((_PCLK_), (_BAUD_))/100U)
812 #define UART_DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_) ((((UART_DIV_SAMPLING8((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) * 100U)) * 8U) + 50U) / 100U)
813 /* UART BRR = mantissa + overflow + fraction
814  = (UART DIVMANT << 4) + ((UART DIVFRAQ & 0xF8) << 1) + (UART DIVFRAQ & 0x07U) */
815 #define UART_BRR_SAMPLING8(_PCLK_, _BAUD_) ((UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) << 4U) + \
816  ((UART_DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0xF8U) << 1U) + \
817  (UART_DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0x07U))
818 
823 /* Private functions ---------------------------------------------------------*/
840 #ifdef __cplusplus
841 }
842 #endif
843 
844 #endif /* __STM32F4xx_HAL_UART_H */
845 
846 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_UART_ErrorCallback
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
HAL_UART_Transmit_IT
HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
HAL_MultiProcessor_ExitMuteMode
HAL_StatusTypeDef HAL_MultiProcessor_ExitMuteMode(UART_HandleTypeDef *huart)
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_UART_TxCpltCallback
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
__UART_HandleTypeDef::Init
UART_InitTypeDef Init
Definition: stm32f4xx_hal_uart.h:145
HAL_UART_StateTypeDef
HAL_UART_StateTypeDef
HAL UART State structures definition.
Definition: stm32f4xx_hal_uart.h:117
HAL_UART_AbortReceive
HAL_StatusTypeDef HAL_UART_AbortReceive(UART_HandleTypeDef *huart)
USART_TypeDef
Universal Synchronous Asynchronous Receiver Transmitter.
Definition: stm32f407xx.h:758
HAL_UART_STATE_TIMEOUT
@ HAL_UART_STATE_TIMEOUT
Definition: stm32f4xx_hal_uart.h:132
HAL_LIN_SendBreak
HAL_StatusTypeDef HAL_LIN_SendBreak(UART_HandleTypeDef *huart)
HAL_UART_Transmit
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
__DMA_HandleTypeDef
DMA handle Structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:139
HAL_UART_Transmit_DMA
HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
huart
UART_HandleTypeDef huart
Definition: pv_stm32f469.c:31
UART_InitTypeDef::OverSampling
uint32_t OverSampling
Definition: stm32f4xx_hal_uart.h:74
__UART_HandleTypeDef::TxXferCount
__IO uint16_t TxXferCount
Definition: stm32f4xx_hal_uart.h:151
HAL_UART_DMAStop
HAL_StatusTypeDef HAL_UART_DMAStop(UART_HandleTypeDef *huart)
HAL_UART_Abort_IT
HAL_StatusTypeDef HAL_UART_Abort_IT(UART_HandleTypeDef *huart)
UART_InitTypeDef::WordLength
uint32_t WordLength
Definition: stm32f4xx_hal_uart.h:55
__UART_HandleTypeDef
UART handle Structure definition.
Definition: stm32f4xx_hal_uart.h:141
UART_InitTypeDef::BaudRate
uint32_t BaudRate
Definition: stm32f4xx_hal_uart.h:49
HAL_LockTypeDef
HAL_LockTypeDef
HAL Lock structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:51
HAL_UART_DMAResume
HAL_StatusTypeDef HAL_UART_DMAResume(UART_HandleTypeDef *huart)
HAL_UART_STATE_BUSY_TX
@ HAL_UART_STATE_BUSY_TX
Definition: stm32f4xx_hal_uart.h:125
HAL_UART_MspInit
void HAL_UART_MspInit(UART_HandleTypeDef *huart)
UART MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32h7xx_hal_msp.c:320
UART_InitTypeDef::StopBits
uint32_t StopBits
Definition: stm32f4xx_hal_uart.h:58
HAL_HalfDuplex_EnableReceiver
HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver(UART_HandleTypeDef *huart)
UART_InitTypeDef
UART Init Structure definition.
Definition: stm32f4xx_hal_uart.h:47
HAL_UART_RxCpltCallback
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
HAL_UART_RxHalfCpltCallback
void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart)
__UART_HandleTypeDef::hdmatx
DMA_HandleTypeDef * hdmatx
Definition: stm32f4xx_hal_uart.h:159
HAL_UART_GetState
HAL_UART_StateTypeDef HAL_UART_GetState(UART_HandleTypeDef *huart)
HAL_UART_AbortReceive_IT
HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart)
stm32f4xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_UART_Init
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
HAL_UART_AbortTransmit_IT
HAL_StatusTypeDef HAL_UART_AbortTransmit_IT(UART_HandleTypeDef *huart)
UART_HandleTypeDef
struct __UART_HandleTypeDef UART_HandleTypeDef
UART handle Structure definition.
__UART_HandleTypeDef::Lock
HAL_LockTypeDef Lock
Definition: stm32f4xx_hal_uart.h:163
HAL_UART_Receive_DMA
HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
__UART_HandleTypeDef::RxState
__IO HAL_UART_StateTypeDef RxState
Definition: stm32f4xx_hal_uart.h:169
HAL_UART_STATE_BUSY_RX
@ HAL_UART_STATE_BUSY_RX
Definition: stm32f4xx_hal_uart.h:127
__UART_HandleTypeDef::TxXferSize
uint16_t TxXferSize
Definition: stm32f4xx_hal_uart.h:149
__UART_HandleTypeDef::pTxBuffPtr
uint8_t * pTxBuffPtr
Definition: stm32f4xx_hal_uart.h:147
HAL_UART_Receive
HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
__UART_HandleTypeDef::gState
__IO HAL_UART_StateTypeDef gState
Definition: stm32f4xx_hal_uart.h:165
__UART_HandleTypeDef::hdmarx
DMA_HandleTypeDef * hdmarx
Definition: stm32f4xx_hal_uart.h:161
__UART_HandleTypeDef::RxXferSize
uint16_t RxXferSize
Definition: stm32f4xx_hal_uart.h:155
__UART_HandleTypeDef::pRxBuffPtr
uint8_t * pRxBuffPtr
Definition: stm32f4xx_hal_uart.h:153
__UART_HandleTypeDef::ErrorCode
__IO uint32_t ErrorCode
Definition: stm32f4xx_hal_uart.h:172
HAL_UART_STATE_BUSY_TX_RX
@ HAL_UART_STATE_BUSY_TX_RX
Definition: stm32f4xx_hal_uart.h:129
HAL_HalfDuplex_EnableTransmitter
HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter(UART_HandleTypeDef *huart)
UART_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f4xx_hal_uart.h:68
HAL_MultiProcessor_Init
HAL_StatusTypeDef HAL_MultiProcessor_Init(UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod)
HAL_UART_AbortTransmit
HAL_StatusTypeDef HAL_UART_AbortTransmit(UART_HandleTypeDef *huart)
HAL_UART_STATE_RESET
@ HAL_UART_STATE_RESET
Definition: stm32f4xx_hal_uart.h:119
HAL_LIN_Init
HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength)
HAL_UART_AbortReceiveCpltCallback
void HAL_UART_AbortReceiveCpltCallback(UART_HandleTypeDef *huart)
HAL_UART_IRQHandler
void HAL_UART_IRQHandler(UART_HandleTypeDef *huart)
UART_InitTypeDef::HwFlowCtl
uint32_t HwFlowCtl
Definition: stm32f4xx_hal_uart.h:71
HAL_HalfDuplex_Init
HAL_StatusTypeDef HAL_HalfDuplex_Init(UART_HandleTypeDef *huart)
HAL_UART_DeInit
HAL_StatusTypeDef HAL_UART_DeInit(UART_HandleTypeDef *huart)
HAL_UART_AbortTransmitCpltCallback
void HAL_UART_AbortTransmitCpltCallback(UART_HandleTypeDef *huart)
HAL_UART_TxHalfCpltCallback
void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart)
HAL_UART_Receive_IT
HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
HAL_MultiProcessor_EnterMuteMode
HAL_StatusTypeDef HAL_MultiProcessor_EnterMuteMode(UART_HandleTypeDef *huart)
__UART_HandleTypeDef::Instance
USART_TypeDef * Instance
Definition: stm32f4xx_hal_uart.h:143
HAL_UART_AbortCpltCallback
void HAL_UART_AbortCpltCallback(UART_HandleTypeDef *huart)
HAL_UART_STATE_BUSY
@ HAL_UART_STATE_BUSY
Definition: stm32f4xx_hal_uart.h:123
__UART_HandleTypeDef::RxXferCount
__IO uint16_t RxXferCount
Definition: stm32f4xx_hal_uart.h:157
HAL_UART_MspDeInit
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
UART MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32h7xx_hal_msp.c:369
HAL_UART_DMAPause
HAL_StatusTypeDef HAL_UART_DMAPause(UART_HandleTypeDef *huart)
HAL_UART_Abort
HAL_StatusTypeDef HAL_UART_Abort(UART_HandleTypeDef *huart)
UART_InitTypeDef::Parity
uint32_t Parity
Definition: stm32f4xx_hal_uart.h:61
HAL_UART_STATE_READY
@ HAL_UART_STATE_READY
Definition: stm32f4xx_hal_uart.h:121
HAL_UART_STATE_ERROR
@ HAL_UART_STATE_ERROR
Definition: stm32f4xx_hal_uart.h:134
HAL_UART_GetError
uint32_t HAL_UART_GetError(UART_HandleTypeDef *huart)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:52