STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_hal_uart.h File Reference

Header file of UART HAL module. More...

Go to the source code of this file.

Data Structures

struct  UART_InitTypeDef
 UART Init Structure definition. More...
 
struct  __UART_HandleTypeDef
 UART handle Structure definition. More...
 

Typedefs

typedef uint32_t HAL_UART_RxTypeTypeDef
 HAL UART Reception type definition. More...
 
typedef uint32_t HAL_UART_RxEventTypeTypeDef
 HAL UART Rx Event type definition. More...
 
typedef struct __UART_HandleTypeDef UART_HandleTypeDef
 UART handle Structure definition.
 
typedef void(* pUART_CallbackTypeDef) (UART_HandleTypeDef *huart)
 HAL UART Callback pointer definition. More...
 
typedef void(* pUART_RxEventCallbackTypeDef) (struct __UART_HandleTypeDef *huart, uint16_t Pos)
 

Enumerations

enum  HAL_UART_StateTypeDef {
  HAL_UART_STATE_RESET = 0x00U , HAL_UART_STATE_READY = 0x20U , HAL_UART_STATE_BUSY = 0x24U , HAL_UART_STATE_BUSY_TX = 0x21U ,
  HAL_UART_STATE_BUSY_RX = 0x22U , HAL_UART_STATE_BUSY_TX_RX = 0x23U , HAL_UART_STATE_TIMEOUT = 0xA0U , HAL_UART_STATE_ERROR = 0xE0U
}
 HAL UART State structures definition. More...
 
enum  HAL_UART_CallbackIDTypeDef {
  HAL_UART_TX_HALFCOMPLETE_CB_ID = 0x00U , HAL_UART_TX_COMPLETE_CB_ID = 0x01U , HAL_UART_RX_HALFCOMPLETE_CB_ID = 0x02U , HAL_UART_RX_COMPLETE_CB_ID = 0x03U ,
  HAL_UART_ERROR_CB_ID = 0x04U , HAL_UART_ABORT_COMPLETE_CB_ID = 0x05U , HAL_UART_ABORT_TRANSMIT_COMPLETE_CB_ID = 0x06U , HAL_UART_ABORT_RECEIVE_COMPLETE_CB_ID = 0x07U ,
  HAL_UART_WAKEUP_CB_ID = 0x08U , HAL_UART_MSPINIT_CB_ID = 0x0BU , HAL_UART_MSPDEINIT_CB_ID = 0x0CU
}
 HAL UART Callback ID enumeration definition. More...
 

Functions

HAL_StatusTypeDef HAL_UART_Init (UART_HandleTypeDef *huart)
 Initializes the UART mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. More...
 
HAL_StatusTypeDef HAL_HalfDuplex_Init (UART_HandleTypeDef *huart)
 Initializes the half-duplex mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. More...
 
HAL_StatusTypeDef HAL_LIN_Init (UART_HandleTypeDef *huart, uint32_t BreakDetectLength)
 Initializes the LIN mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. More...
 
HAL_StatusTypeDef HAL_MultiProcessor_Init (UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod)
 Initializes the Multi-Processor mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. More...
 
HAL_StatusTypeDef HAL_UART_DeInit (UART_HandleTypeDef *huart)
 DeInitializes the UART peripheral. More...
 
void HAL_UART_MspInit (UART_HandleTypeDef *huart)
 UART MSP Init. More...
 
void HAL_UART_MspDeInit (UART_HandleTypeDef *huart)
 UART MSP DeInit. More...
 
HAL_StatusTypeDef HAL_UART_RegisterCallback (UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID, pUART_CallbackTypeDef pCallback)
 Register a User UART Callback To be used instead of the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_UART_UnRegisterCallback (UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID)
 Unregister an UART Callback UART callaback is redirected to the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_UART_RegisterRxEventCallback (UART_HandleTypeDef *huart, pUART_RxEventCallbackTypeDef pCallback)
 Register a User UART Rx Event Callback To be used instead of the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_UART_UnRegisterRxEventCallback (UART_HandleTypeDef *huart)
 UnRegister the UART Rx Event Callback UART Rx Event Callback is redirected to the weak HAL_UARTEx_RxEventCallback() predefined callback. More...
 
HAL_StatusTypeDef HAL_UART_Transmit (UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
 Sends an amount of data in blocking mode. More...
 
HAL_StatusTypeDef HAL_UART_Receive (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 Receives an amount of data in blocking mode. More...
 
HAL_StatusTypeDef HAL_UART_Transmit_IT (UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size)
 Sends an amount of data in non blocking mode. More...
 
HAL_StatusTypeDef HAL_UART_Receive_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
 Receives an amount of data in non blocking mode. More...
 
HAL_StatusTypeDef HAL_UART_Transmit_DMA (UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size)
 Sends an amount of data in DMA mode. More...
 
HAL_StatusTypeDef HAL_UART_Receive_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
 Receives an amount of data in DMA mode. More...
 
HAL_StatusTypeDef HAL_UART_DMAPause (UART_HandleTypeDef *huart)
 Pauses the DMA Transfer. More...
 
HAL_StatusTypeDef HAL_UART_DMAResume (UART_HandleTypeDef *huart)
 Resumes the DMA Transfer. More...
 
HAL_StatusTypeDef HAL_UART_DMAStop (UART_HandleTypeDef *huart)
 Stops the DMA Transfer. More...
 
HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint16_t *RxLen, uint32_t Timeout)
 Receive an amount of data in blocking mode till either the expected number of data is received or an IDLE event occurs. More...
 
HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
 Receive an amount of data in interrupt mode till either the expected number of data is received or an IDLE event occurs. More...
 
HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
 Receive an amount of data in DMA mode till either the expected number of data is received or an IDLE event occurs. More...
 
HAL_UART_RxEventTypeTypeDef HAL_UARTEx_GetRxEventType (UART_HandleTypeDef *huart)
 Provide Rx Event type that has lead to RxEvent callback execution. More...
 
HAL_StatusTypeDef HAL_UART_Abort (UART_HandleTypeDef *huart)
 Abort ongoing transfers (blocking mode). More...
 
HAL_StatusTypeDef HAL_UART_AbortTransmit (UART_HandleTypeDef *huart)
 Abort ongoing Transmit transfer (blocking mode). More...
 
HAL_StatusTypeDef HAL_UART_AbortReceive (UART_HandleTypeDef *huart)
 Abort ongoing Receive transfer (blocking mode). More...
 
HAL_StatusTypeDef HAL_UART_Abort_IT (UART_HandleTypeDef *huart)
 Abort ongoing transfers (Interrupt mode). More...
 
HAL_StatusTypeDef HAL_UART_AbortTransmit_IT (UART_HandleTypeDef *huart)
 Abort ongoing Transmit transfer (Interrupt mode). More...
 
HAL_StatusTypeDef HAL_UART_AbortReceive_IT (UART_HandleTypeDef *huart)
 Abort ongoing Receive transfer (Interrupt mode). More...
 
void HAL_UART_IRQHandler (UART_HandleTypeDef *huart)
 This function handles UART interrupt request. More...
 
void HAL_UART_TxCpltCallback (UART_HandleTypeDef *huart)
 Tx Transfer completed callbacks. More...
 
void HAL_UART_TxHalfCpltCallback (UART_HandleTypeDef *huart)
 Tx Half Transfer completed callbacks. More...
 
void HAL_UART_RxCpltCallback (UART_HandleTypeDef *huart)
 Rx Transfer completed callbacks. More...
 
void HAL_UART_RxHalfCpltCallback (UART_HandleTypeDef *huart)
 Rx Half Transfer completed callbacks. More...
 
void HAL_UART_ErrorCallback (UART_HandleTypeDef *huart)
 UART error callbacks. More...
 
void HAL_UART_AbortCpltCallback (UART_HandleTypeDef *huart)
 UART Abort Complete callback. More...
 
void HAL_UART_AbortTransmitCpltCallback (UART_HandleTypeDef *huart)
 UART Abort Complete callback. More...
 
void HAL_UART_AbortReceiveCpltCallback (UART_HandleTypeDef *huart)
 UART Abort Receive Complete callback. More...
 
void HAL_UARTEx_RxEventCallback (UART_HandleTypeDef *huart, uint16_t Size)
 Reception Event Callback (Rx event notification called after use of advanced reception service). More...
 
HAL_StatusTypeDef HAL_LIN_SendBreak (UART_HandleTypeDef *huart)
 Transmits break characters. More...
 
HAL_StatusTypeDef HAL_MultiProcessor_EnterMuteMode (UART_HandleTypeDef *huart)
 Enters the UART in mute mode. More...
 
HAL_StatusTypeDef HAL_MultiProcessor_ExitMuteMode (UART_HandleTypeDef *huart)
 Exits the UART mute mode: wake up software. More...
 
HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter (UART_HandleTypeDef *huart)
 Enables the UART transmitter and disables the UART receiver. More...
 
HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver (UART_HandleTypeDef *huart)
 Enables the UART receiver and disables the UART transmitter. More...
 
HAL_UART_StateTypeDef HAL_UART_GetState (const UART_HandleTypeDef *huart)
 Returns the UART state. More...
 
uint32_t HAL_UART_GetError (const UART_HandleTypeDef *huart)
 Return the UART error code. More...
 
HAL_StatusTypeDef UART_Start_Receive_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
 Start Receive operation in interrupt mode. More...
 
HAL_StatusTypeDef UART_Start_Receive_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
 Start Receive operation in DMA mode. More...
 

Detailed Description

Header file of UART HAL module.

Author
MCD Application Team
Attention

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_uart.h.