STM32F439xx HAL User Manual
|
UART HAL module driver. This file provides firmware functions to manage the following functionalities of the Universal Asynchronous Receiver Transmitter (UART) peripheral: + Initialization and de-initialization functions + IO operation functions + Peripheral Control functions + Peripheral State and Errors functions. More...
#include "stm32f4xx_hal.h"
Go to the source code of this file.
Functions | |
static void | UART_EndTxTransfer (UART_HandleTypeDef *huart) |
End ongoing Tx transfer on UART peripheral (following error detection or Transmit completion). | |
static void | UART_EndRxTransfer (UART_HandleTypeDef *huart) |
End ongoing Rx transfer on UART peripheral (following error detection or Reception completion). | |
static void | UART_DMATransmitCplt (DMA_HandleTypeDef *hdma) |
DMA UART transmit process complete callback. | |
static void | UART_DMAReceiveCplt (DMA_HandleTypeDef *hdma) |
DMA UART receive process complete callback. | |
static void | UART_DMATxHalfCplt (DMA_HandleTypeDef *hdma) |
DMA UART transmit process half complete callback. | |
static void | UART_DMARxHalfCplt (DMA_HandleTypeDef *hdma) |
DMA UART receive process half complete callback. | |
static void | UART_DMAError (DMA_HandleTypeDef *hdma) |
DMA UART communication error callback. | |
static void | UART_DMAAbortOnError (DMA_HandleTypeDef *hdma) |
DMA UART communication abort callback, when initiated by HAL services on Error (To be called at end of DMA Abort procedure following error occurrence). | |
static void | UART_DMATxAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Tx communication abort callback, when initiated by user (To be called at end of DMA Tx Abort procedure following user abort request). | |
static void | UART_DMARxAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Rx communication abort callback, when initiated by user (To be called at end of DMA Rx Abort procedure following user abort request). | |
static void | UART_DMATxOnlyAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Tx communication abort callback, when initiated by user by a call to HAL_UART_AbortTransmit_IT API (Abort only Tx transfer) (This callback is executed at end of DMA Tx Abort procedure following user abort request, and leads to user Tx Abort Complete callback execution). | |
static void | UART_DMARxOnlyAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Rx communication abort callback, when initiated by user by a call to HAL_UART_AbortReceive_IT API (Abort only Rx transfer) (This callback is executed at end of DMA Rx Abort procedure following user abort request, and leads to user Rx Abort Complete callback execution). | |
static HAL_StatusTypeDef | UART_Transmit_IT (UART_HandleTypeDef *huart) |
Sends an amount of data in non blocking mode. | |
static HAL_StatusTypeDef | UART_EndTransmit_IT (UART_HandleTypeDef *huart) |
Wraps up transmission in non blocking mode. | |
static HAL_StatusTypeDef | UART_Receive_IT (UART_HandleTypeDef *huart) |
Receives an amount of data in non blocking mode. | |
static HAL_StatusTypeDef | UART_WaitOnFlagUntilTimeout (UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout) |
This function handles UART Communication Timeout. | |
static void | UART_SetConfig (UART_HandleTypeDef *huart) |
Configures the UART peripheral. | |
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. | |
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. | |
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. | |
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. | |
HAL_StatusTypeDef | HAL_UART_DeInit (UART_HandleTypeDef *huart) |
DeInitializes the UART peripheral. | |
__weak void | HAL_UART_MspInit (UART_HandleTypeDef *huart) |
UART MSP Init. | |
__weak void | HAL_UART_MspDeInit (UART_HandleTypeDef *huart) |
UART MSP DeInit. | |
HAL_StatusTypeDef | HAL_UART_Transmit (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout) |
Sends an amount of data in blocking mode. | |
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. | |
HAL_StatusTypeDef | HAL_UART_Transmit_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
Sends an amount of data in non blocking mode. | |
HAL_StatusTypeDef | HAL_UART_Receive_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
Receives an amount of data in non blocking mode. | |
HAL_StatusTypeDef | HAL_UART_Transmit_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
Sends an amount of data in non blocking mode. | |
HAL_StatusTypeDef | HAL_UART_Receive_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
Receives an amount of data in non blocking mode. | |
HAL_StatusTypeDef | HAL_UART_DMAPause (UART_HandleTypeDef *huart) |
Pauses the DMA Transfer. | |
HAL_StatusTypeDef | HAL_UART_DMAResume (UART_HandleTypeDef *huart) |
Resumes the DMA Transfer. | |
HAL_StatusTypeDef | HAL_UART_DMAStop (UART_HandleTypeDef *huart) |
Stops the DMA Transfer. | |
HAL_StatusTypeDef | HAL_UART_Abort (UART_HandleTypeDef *huart) |
Abort ongoing transfers (blocking mode). | |
HAL_StatusTypeDef | HAL_UART_AbortTransmit (UART_HandleTypeDef *huart) |
Abort ongoing Transmit transfer (blocking mode). | |
HAL_StatusTypeDef | HAL_UART_AbortReceive (UART_HandleTypeDef *huart) |
Abort ongoing Receive transfer (blocking mode). | |
HAL_StatusTypeDef | HAL_UART_Abort_IT (UART_HandleTypeDef *huart) |
Abort ongoing transfers (Interrupt mode). | |
HAL_StatusTypeDef | HAL_UART_AbortTransmit_IT (UART_HandleTypeDef *huart) |
Abort ongoing Transmit transfer (Interrupt mode). | |
HAL_StatusTypeDef | HAL_UART_AbortReceive_IT (UART_HandleTypeDef *huart) |
Abort ongoing Receive transfer (Interrupt mode). | |
void | HAL_UART_IRQHandler (UART_HandleTypeDef *huart) |
This function handles UART interrupt request. | |
__weak void | HAL_UART_TxCpltCallback (UART_HandleTypeDef *huart) |
Tx Transfer completed callbacks. | |
__weak void | HAL_UART_TxHalfCpltCallback (UART_HandleTypeDef *huart) |
Tx Half Transfer completed callbacks. | |
__weak void | HAL_UART_RxCpltCallback (UART_HandleTypeDef *huart) |
Rx Transfer completed callbacks. | |
__weak void | HAL_UART_RxHalfCpltCallback (UART_HandleTypeDef *huart) |
Rx Half Transfer completed callbacks. | |
__weak void | HAL_UART_ErrorCallback (UART_HandleTypeDef *huart) |
UART error callbacks. | |
__weak void | HAL_UART_AbortCpltCallback (UART_HandleTypeDef *huart) |
UART Abort Complete callback. | |
__weak void | HAL_UART_AbortTransmitCpltCallback (UART_HandleTypeDef *huart) |
UART Abort Complete callback. | |
__weak void | HAL_UART_AbortReceiveCpltCallback (UART_HandleTypeDef *huart) |
UART Abort Receive Complete callback. | |
HAL_StatusTypeDef | HAL_LIN_SendBreak (UART_HandleTypeDef *huart) |
Transmits break characters. | |
HAL_StatusTypeDef | HAL_MultiProcessor_EnterMuteMode (UART_HandleTypeDef *huart) |
Enters the UART in mute mode. | |
HAL_StatusTypeDef | HAL_MultiProcessor_ExitMuteMode (UART_HandleTypeDef *huart) |
Exits the UART mute mode: wake up software. | |
HAL_StatusTypeDef | HAL_HalfDuplex_EnableTransmitter (UART_HandleTypeDef *huart) |
Enables the UART transmitter and disables the UART receiver. | |
HAL_StatusTypeDef | HAL_HalfDuplex_EnableReceiver (UART_HandleTypeDef *huart) |
Enables the UART receiver and disables the UART transmitter. | |
HAL_UART_StateTypeDef | HAL_UART_GetState (UART_HandleTypeDef *huart) |
Returns the UART state. | |
uint32_t | HAL_UART_GetError (UART_HandleTypeDef *huart) |
Return the UART error code. |
UART HAL module driver. This file provides firmware functions to manage the following functionalities of the Universal Asynchronous Receiver Transmitter (UART) peripheral: + Initialization and de-initialization functions + IO operation functions + Peripheral Control functions + Peripheral State and Errors functions.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32f4xx_hal_uart.c.