mbed w/ spi bug fig

Dependents:   display-puck

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Jun 27 07:30:09 2014 +0100
Revision:
242:7074e42da0b2
Parent:
133:d4dda5c437f0
Synchronized with git revision 124ef5e3add9e74a3221347a3fbeea7c8b3cf353

Full URL: https://github.com/mbedmicro/mbed/commit/124ef5e3add9e74a3221347a3fbeea7c8b3cf353/

[DISCO_F407VG] HAL update.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 133:d4dda5c437f0 1 /**
mbed_official 133:d4dda5c437f0 2 ******************************************************************************
mbed_official 133:d4dda5c437f0 3 * @file stm32f4xx_hal_uart.h
mbed_official 133:d4dda5c437f0 4 * @author MCD Application Team
mbed_official 242:7074e42da0b2 5 * @version V1.1.0RC2
mbed_official 242:7074e42da0b2 6 * @date 14-May-2014
mbed_official 133:d4dda5c437f0 7 * @brief Header file of UART HAL module.
mbed_official 133:d4dda5c437f0 8 ******************************************************************************
mbed_official 133:d4dda5c437f0 9 * @attention
mbed_official 133:d4dda5c437f0 10 *
mbed_official 133:d4dda5c437f0 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 133:d4dda5c437f0 12 *
mbed_official 133:d4dda5c437f0 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 133:d4dda5c437f0 14 * are permitted provided that the following conditions are met:
mbed_official 133:d4dda5c437f0 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 133:d4dda5c437f0 16 * this list of conditions and the following disclaimer.
mbed_official 133:d4dda5c437f0 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 133:d4dda5c437f0 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 133:d4dda5c437f0 19 * and/or other materials provided with the distribution.
mbed_official 133:d4dda5c437f0 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 133:d4dda5c437f0 21 * may be used to endorse or promote products derived from this software
mbed_official 133:d4dda5c437f0 22 * without specific prior written permission.
mbed_official 133:d4dda5c437f0 23 *
mbed_official 133:d4dda5c437f0 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 133:d4dda5c437f0 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 133:d4dda5c437f0 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 133:d4dda5c437f0 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 133:d4dda5c437f0 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 133:d4dda5c437f0 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 133:d4dda5c437f0 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 133:d4dda5c437f0 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 133:d4dda5c437f0 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 133:d4dda5c437f0 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 133:d4dda5c437f0 34 *
mbed_official 133:d4dda5c437f0 35 ******************************************************************************
mbed_official 133:d4dda5c437f0 36 */
mbed_official 133:d4dda5c437f0 37
mbed_official 133:d4dda5c437f0 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 133:d4dda5c437f0 39 #ifndef __STM32F4xx_HAL_UART_H
mbed_official 133:d4dda5c437f0 40 #define __STM32F4xx_HAL_UART_H
mbed_official 133:d4dda5c437f0 41
mbed_official 133:d4dda5c437f0 42 #ifdef __cplusplus
mbed_official 133:d4dda5c437f0 43 extern "C" {
mbed_official 133:d4dda5c437f0 44 #endif
mbed_official 133:d4dda5c437f0 45
mbed_official 133:d4dda5c437f0 46 /* Includes ------------------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 47 #include "stm32f4xx_hal_def.h"
mbed_official 133:d4dda5c437f0 48
mbed_official 133:d4dda5c437f0 49 /** @addtogroup STM32F4xx_HAL_Driver
mbed_official 133:d4dda5c437f0 50 * @{
mbed_official 133:d4dda5c437f0 51 */
mbed_official 133:d4dda5c437f0 52
mbed_official 133:d4dda5c437f0 53 /** @addtogroup UART
mbed_official 133:d4dda5c437f0 54 * @{
mbed_official 133:d4dda5c437f0 55 */
mbed_official 133:d4dda5c437f0 56
mbed_official 133:d4dda5c437f0 57 /* Exported types ------------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 58
mbed_official 133:d4dda5c437f0 59 /**
mbed_official 133:d4dda5c437f0 60 * @brief UART Init Structure definition
mbed_official 133:d4dda5c437f0 61 */
mbed_official 133:d4dda5c437f0 62 typedef struct
mbed_official 133:d4dda5c437f0 63 {
mbed_official 133:d4dda5c437f0 64 uint32_t BaudRate; /*!< This member configures the UART communication baud rate.
mbed_official 133:d4dda5c437f0 65 The baud rate is computed using the following formula:
mbed_official 133:d4dda5c437f0 66 - IntegerDivider = ((PCLKx) / (8 * (OVR8+1) * (huart->Init.BaudRate)))
mbed_official 133:d4dda5c437f0 67 - FractionalDivider = ((IntegerDivider - ((uint32_t) IntegerDivider)) * 8 * (OVR8+1)) + 0.5
mbed_official 133:d4dda5c437f0 68 Where OVR8 is the "oversampling by 8 mode" configuration bit in the CR1 register. */
mbed_official 133:d4dda5c437f0 69
mbed_official 133:d4dda5c437f0 70 uint32_t WordLength; /*!< Specifies the number of data bits transmitted or received in a frame.
mbed_official 133:d4dda5c437f0 71 This parameter can be a value of @ref UART_Word_Length */
mbed_official 133:d4dda5c437f0 72
mbed_official 133:d4dda5c437f0 73 uint32_t StopBits; /*!< Specifies the number of stop bits transmitted.
mbed_official 133:d4dda5c437f0 74 This parameter can be a value of @ref UART_Stop_Bits */
mbed_official 133:d4dda5c437f0 75
mbed_official 133:d4dda5c437f0 76 uint32_t Parity; /*!< Specifies the parity mode.
mbed_official 133:d4dda5c437f0 77 This parameter can be a value of @ref UART_Parity
mbed_official 133:d4dda5c437f0 78 @note When parity is enabled, the computed parity is inserted
mbed_official 133:d4dda5c437f0 79 at the MSB position of the transmitted data (9th bit when
mbed_official 133:d4dda5c437f0 80 the word length is set to 9 data bits; 8th bit when the
mbed_official 133:d4dda5c437f0 81 word length is set to 8 data bits). */
mbed_official 133:d4dda5c437f0 82
mbed_official 133:d4dda5c437f0 83 uint32_t Mode; /*!< Specifies wether the Receive or Transmit mode is enabled or disabled.
mbed_official 133:d4dda5c437f0 84 This parameter can be a value of @ref UART_Mode */
mbed_official 133:d4dda5c437f0 85
mbed_official 133:d4dda5c437f0 86 uint32_t HwFlowCtl; /*!< Specifies wether the hardware flow control mode is enabled
mbed_official 133:d4dda5c437f0 87 or disabled.
mbed_official 133:d4dda5c437f0 88 This parameter can be a value of @ref UART_Hardware_Flow_Control */
mbed_official 133:d4dda5c437f0 89
mbed_official 133:d4dda5c437f0 90 uint32_t OverSampling; /*!< Specifies wether the Over sampling 8 is enabled or disabled, to achieve higher speed (up to fPCLK/8).
mbed_official 133:d4dda5c437f0 91 This parameter can be a value of @ref UART_Over_Sampling */
mbed_official 133:d4dda5c437f0 92 }UART_InitTypeDef;
mbed_official 133:d4dda5c437f0 93
mbed_official 133:d4dda5c437f0 94 /**
mbed_official 133:d4dda5c437f0 95 * @brief HAL UART State structures definition
mbed_official 133:d4dda5c437f0 96 */
mbed_official 133:d4dda5c437f0 97 typedef enum
mbed_official 133:d4dda5c437f0 98 {
mbed_official 133:d4dda5c437f0 99 HAL_UART_STATE_RESET = 0x00, /*!< Peripheral is not yet Initialized */
mbed_official 133:d4dda5c437f0 100 HAL_UART_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
mbed_official 133:d4dda5c437f0 101 HAL_UART_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
mbed_official 133:d4dda5c437f0 102 HAL_UART_STATE_BUSY_TX = 0x12, /*!< Data Transmission process is ongoing */
mbed_official 133:d4dda5c437f0 103 HAL_UART_STATE_BUSY_RX = 0x22, /*!< Data Reception process is ongoing */
mbed_official 133:d4dda5c437f0 104 HAL_UART_STATE_BUSY_TX_RX = 0x32, /*!< Data Transmission and Reception process is ongoing */
mbed_official 133:d4dda5c437f0 105 HAL_UART_STATE_TIMEOUT = 0x03, /*!< Timeout state */
mbed_official 133:d4dda5c437f0 106 HAL_UART_STATE_ERROR = 0x04 /*!< Error */
mbed_official 133:d4dda5c437f0 107 }HAL_UART_StateTypeDef;
mbed_official 133:d4dda5c437f0 108
mbed_official 133:d4dda5c437f0 109 /**
mbed_official 133:d4dda5c437f0 110 * @brief HAL UART Error Code structure definition
mbed_official 133:d4dda5c437f0 111 */
mbed_official 133:d4dda5c437f0 112 typedef enum
mbed_official 133:d4dda5c437f0 113 {
mbed_official 133:d4dda5c437f0 114 HAL_UART_ERROR_NONE = 0x00, /*!< No error */
mbed_official 133:d4dda5c437f0 115 HAL_UART_ERROR_PE = 0x01, /*!< Parity error */
mbed_official 133:d4dda5c437f0 116 HAL_UART_ERROR_NE = 0x02, /*!< Noise error */
mbed_official 133:d4dda5c437f0 117 HAL_UART_ERROR_FE = 0x04, /*!< frame error */
mbed_official 133:d4dda5c437f0 118 HAL_UART_ERROR_ORE = 0x08, /*!< Overrun error */
mbed_official 133:d4dda5c437f0 119 HAL_UART_ERROR_DMA = 0x10 /*!< DMA transfer error */
mbed_official 133:d4dda5c437f0 120 }HAL_UART_ErrorTypeDef;
mbed_official 133:d4dda5c437f0 121
mbed_official 133:d4dda5c437f0 122 /**
mbed_official 133:d4dda5c437f0 123 * @brief UART handle Structure definition
mbed_official 133:d4dda5c437f0 124 */
mbed_official 133:d4dda5c437f0 125 typedef struct
mbed_official 133:d4dda5c437f0 126 {
mbed_official 133:d4dda5c437f0 127 USART_TypeDef *Instance; /* UART registers base address */
mbed_official 133:d4dda5c437f0 128
mbed_official 133:d4dda5c437f0 129 UART_InitTypeDef Init; /* UART communication parameters */
mbed_official 133:d4dda5c437f0 130
mbed_official 133:d4dda5c437f0 131 uint8_t *pTxBuffPtr; /* Pointer to UART Tx transfer Buffer */
mbed_official 133:d4dda5c437f0 132
mbed_official 133:d4dda5c437f0 133 uint16_t TxXferSize; /* UART Tx Transfer size */
mbed_official 133:d4dda5c437f0 134
mbed_official 133:d4dda5c437f0 135 uint16_t TxXferCount; /* UART Tx Transfer Counter */
mbed_official 133:d4dda5c437f0 136
mbed_official 133:d4dda5c437f0 137 uint8_t *pRxBuffPtr; /* Pointer to UART Rx transfer Buffer */
mbed_official 133:d4dda5c437f0 138
mbed_official 133:d4dda5c437f0 139 uint16_t RxXferSize; /* UART Rx Transfer size */
mbed_official 133:d4dda5c437f0 140
mbed_official 133:d4dda5c437f0 141 uint16_t RxXferCount; /* UART Rx Transfer Counter */
mbed_official 133:d4dda5c437f0 142
mbed_official 133:d4dda5c437f0 143 DMA_HandleTypeDef *hdmatx; /* UART Tx DMA Handle parameters */
mbed_official 133:d4dda5c437f0 144
mbed_official 133:d4dda5c437f0 145 DMA_HandleTypeDef *hdmarx; /* UART Rx DMA Handle parameters */
mbed_official 133:d4dda5c437f0 146
mbed_official 133:d4dda5c437f0 147 HAL_LockTypeDef Lock; /* Locking object */
mbed_official 133:d4dda5c437f0 148
mbed_official 133:d4dda5c437f0 149 __IO HAL_UART_StateTypeDef State; /* UART communication state */
mbed_official 133:d4dda5c437f0 150
mbed_official 133:d4dda5c437f0 151 __IO HAL_UART_ErrorTypeDef ErrorCode; /* UART Error code */
mbed_official 133:d4dda5c437f0 152
mbed_official 133:d4dda5c437f0 153 }UART_HandleTypeDef;
mbed_official 133:d4dda5c437f0 154
mbed_official 133:d4dda5c437f0 155 /* Exported constants --------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 156 /** @defgroup UART_Exported_Constants
mbed_official 133:d4dda5c437f0 157 * @{
mbed_official 133:d4dda5c437f0 158 */
mbed_official 133:d4dda5c437f0 159
mbed_official 133:d4dda5c437f0 160 /** @defgroup UART_Word_Length
mbed_official 133:d4dda5c437f0 161 * @{
mbed_official 133:d4dda5c437f0 162 */
mbed_official 133:d4dda5c437f0 163 #define UART_WORDLENGTH_8B ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 164 #define UART_WORDLENGTH_9B ((uint32_t)USART_CR1_M)
mbed_official 133:d4dda5c437f0 165 #define IS_UART_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B) || \
mbed_official 133:d4dda5c437f0 166 ((LENGTH) == UART_WORDLENGTH_9B))
mbed_official 133:d4dda5c437f0 167 /**
mbed_official 133:d4dda5c437f0 168 * @}
mbed_official 133:d4dda5c437f0 169 */
mbed_official 133:d4dda5c437f0 170
mbed_official 133:d4dda5c437f0 171 /** @defgroup UART_Stop_Bits
mbed_official 133:d4dda5c437f0 172 * @{
mbed_official 133:d4dda5c437f0 173 */
mbed_official 133:d4dda5c437f0 174 #define UART_STOPBITS_1 ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 175 #define UART_STOPBITS_2 ((uint32_t)USART_CR2_STOP_1)
mbed_official 133:d4dda5c437f0 176 #define IS_UART_STOPBITS(STOPBITS) (((STOPBITS) == UART_STOPBITS_1) || \
mbed_official 133:d4dda5c437f0 177 ((STOPBITS) == UART_STOPBITS_2))
mbed_official 133:d4dda5c437f0 178 /**
mbed_official 133:d4dda5c437f0 179 * @}
mbed_official 133:d4dda5c437f0 180 */
mbed_official 133:d4dda5c437f0 181
mbed_official 133:d4dda5c437f0 182 /** @defgroup UART_Parity
mbed_official 133:d4dda5c437f0 183 * @{
mbed_official 133:d4dda5c437f0 184 */
mbed_official 133:d4dda5c437f0 185 #define UART_PARITY_NONE ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 186 #define UART_PARITY_EVEN ((uint32_t)USART_CR1_PCE)
mbed_official 133:d4dda5c437f0 187 #define UART_PARITY_ODD ((uint32_t)(USART_CR1_PCE | USART_CR1_PS))
mbed_official 133:d4dda5c437f0 188 #define IS_UART_PARITY(PARITY) (((PARITY) == UART_PARITY_NONE) || \
mbed_official 133:d4dda5c437f0 189 ((PARITY) == UART_PARITY_EVEN) || \
mbed_official 133:d4dda5c437f0 190 ((PARITY) == UART_PARITY_ODD))
mbed_official 133:d4dda5c437f0 191 /**
mbed_official 133:d4dda5c437f0 192 * @}
mbed_official 133:d4dda5c437f0 193 */
mbed_official 133:d4dda5c437f0 194
mbed_official 133:d4dda5c437f0 195 /** @defgroup UART_Hardware_Flow_Control
mbed_official 133:d4dda5c437f0 196 * @{
mbed_official 133:d4dda5c437f0 197 */
mbed_official 133:d4dda5c437f0 198 #define UART_HWCONTROL_NONE ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 199 #define UART_HWCONTROL_RTS ((uint32_t)USART_CR3_RTSE)
mbed_official 133:d4dda5c437f0 200 #define UART_HWCONTROL_CTS ((uint32_t)USART_CR3_CTSE)
mbed_official 133:d4dda5c437f0 201 #define UART_HWCONTROL_RTS_CTS ((uint32_t)(USART_CR3_RTSE | USART_CR3_CTSE))
mbed_official 133:d4dda5c437f0 202 #define IS_UART_HARDWARE_FLOW_CONTROL(CONTROL)\
mbed_official 133:d4dda5c437f0 203 (((CONTROL) == UART_HWCONTROL_NONE) || \
mbed_official 133:d4dda5c437f0 204 ((CONTROL) == UART_HWCONTROL_RTS) || \
mbed_official 133:d4dda5c437f0 205 ((CONTROL) == UART_HWCONTROL_CTS) || \
mbed_official 133:d4dda5c437f0 206 ((CONTROL) == UART_HWCONTROL_RTS_CTS))
mbed_official 133:d4dda5c437f0 207 /**
mbed_official 133:d4dda5c437f0 208 * @}
mbed_official 133:d4dda5c437f0 209 */
mbed_official 133:d4dda5c437f0 210
mbed_official 133:d4dda5c437f0 211 /** @defgroup UART_Mode
mbed_official 133:d4dda5c437f0 212 * @{
mbed_official 133:d4dda5c437f0 213 */
mbed_official 133:d4dda5c437f0 214 #define UART_MODE_RX ((uint32_t)USART_CR1_RE)
mbed_official 133:d4dda5c437f0 215 #define UART_MODE_TX ((uint32_t)USART_CR1_TE)
mbed_official 133:d4dda5c437f0 216 #define UART_MODE_TX_RX ((uint32_t)(USART_CR1_TE |USART_CR1_RE))
mbed_official 133:d4dda5c437f0 217 #define IS_UART_MODE(MODE) ((((MODE) & (uint32_t)0x0000FFF3) == 0x00) && ((MODE) != (uint32_t)0x000000))
mbed_official 133:d4dda5c437f0 218 /**
mbed_official 133:d4dda5c437f0 219 * @}
mbed_official 133:d4dda5c437f0 220 */
mbed_official 133:d4dda5c437f0 221
mbed_official 133:d4dda5c437f0 222 /** @defgroup UART_State
mbed_official 133:d4dda5c437f0 223 * @{
mbed_official 133:d4dda5c437f0 224 */
mbed_official 133:d4dda5c437f0 225 #define UART_STATE_DISABLE ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 226 #define UART_STATE_ENABLE ((uint32_t)USART_CR1_UE)
mbed_official 133:d4dda5c437f0 227 #define IS_UART_STATE(STATE) (((STATE) == UART_STATE_DISABLE) || \
mbed_official 133:d4dda5c437f0 228 ((STATE) == UART_STATE_ENABLE))
mbed_official 133:d4dda5c437f0 229 /**
mbed_official 133:d4dda5c437f0 230 * @}
mbed_official 133:d4dda5c437f0 231 */
mbed_official 133:d4dda5c437f0 232
mbed_official 133:d4dda5c437f0 233 /** @defgroup UART_Over_Sampling
mbed_official 133:d4dda5c437f0 234 * @{
mbed_official 133:d4dda5c437f0 235 */
mbed_official 133:d4dda5c437f0 236 #define UART_OVERSAMPLING_16 ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 237 #define UART_OVERSAMPLING_8 ((uint32_t)USART_CR1_OVER8)
mbed_official 133:d4dda5c437f0 238 #define IS_UART_OVERSAMPLING(SAMPLING) (((SAMPLING) == UART_OVERSAMPLING_16) || \
mbed_official 133:d4dda5c437f0 239 ((SAMPLING) == UART_OVERSAMPLING_8))
mbed_official 133:d4dda5c437f0 240 /**
mbed_official 133:d4dda5c437f0 241 * @}
mbed_official 133:d4dda5c437f0 242 */
mbed_official 133:d4dda5c437f0 243
mbed_official 133:d4dda5c437f0 244 /** @defgroup UART_LIN_Break_Detection_Length
mbed_official 133:d4dda5c437f0 245 * @{
mbed_official 133:d4dda5c437f0 246 */
mbed_official 133:d4dda5c437f0 247 #define UART_LINBREAKDETECTLENGTH_10B ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 248 #define UART_LINBREAKDETECTLENGTH_11B ((uint32_t)0x00000020)
mbed_official 133:d4dda5c437f0 249 #define IS_UART_LIN_BREAK_DETECT_LENGTH(LENGTH) (((LENGTH) == UART_LINBREAKDETECTLENGTH_10B) || \
mbed_official 133:d4dda5c437f0 250 ((LENGTH) == UART_LINBREAKDETECTLENGTH_11B))
mbed_official 133:d4dda5c437f0 251 /**
mbed_official 133:d4dda5c437f0 252 * @}
mbed_official 133:d4dda5c437f0 253 */
mbed_official 133:d4dda5c437f0 254
mbed_official 133:d4dda5c437f0 255 /** @defgroup UART_WakeUp_functions
mbed_official 133:d4dda5c437f0 256 * @{
mbed_official 133:d4dda5c437f0 257 */
mbed_official 133:d4dda5c437f0 258 #define UART_WAKEUPMETHODE_IDLELINE ((uint32_t)0x00000000)
mbed_official 133:d4dda5c437f0 259 #define UART_WAKEUPMETHODE_ADDRESSMARK ((uint32_t)0x00000800)
mbed_official 133:d4dda5c437f0 260 #define IS_UART_WAKEUPMETHODE(WAKEUP) (((WAKEUP) == UART_WAKEUPMETHODE_IDLELINE) || \
mbed_official 133:d4dda5c437f0 261 ((WAKEUP) == UART_WAKEUPMETHODE_ADDRESSMARK))
mbed_official 133:d4dda5c437f0 262 /**
mbed_official 133:d4dda5c437f0 263 * @}
mbed_official 133:d4dda5c437f0 264 */
mbed_official 133:d4dda5c437f0 265
mbed_official 133:d4dda5c437f0 266 /** @defgroup UART_Flags
mbed_official 133:d4dda5c437f0 267 * Elements values convention: 0xXXXX
mbed_official 133:d4dda5c437f0 268 * - 0xXXXX : Flag mask in the SR register
mbed_official 133:d4dda5c437f0 269 * @{
mbed_official 133:d4dda5c437f0 270 */
mbed_official 133:d4dda5c437f0 271 #define UART_FLAG_CTS ((uint32_t)0x00000200)
mbed_official 133:d4dda5c437f0 272 #define UART_FLAG_LBD ((uint32_t)0x00000100)
mbed_official 133:d4dda5c437f0 273 #define UART_FLAG_TXE ((uint32_t)0x00000080)
mbed_official 133:d4dda5c437f0 274 #define UART_FLAG_TC ((uint32_t)0x00000040)
mbed_official 133:d4dda5c437f0 275 #define UART_FLAG_RXNE ((uint32_t)0x00000020)
mbed_official 133:d4dda5c437f0 276 #define UART_FLAG_IDLE ((uint32_t)0x00000010)
mbed_official 133:d4dda5c437f0 277 #define UART_FLAG_ORE ((uint32_t)0x00000008)
mbed_official 133:d4dda5c437f0 278 #define UART_FLAG_NE ((uint32_t)0x00000004)
mbed_official 133:d4dda5c437f0 279 #define UART_FLAG_FE ((uint32_t)0x00000002)
mbed_official 133:d4dda5c437f0 280 #define UART_FLAG_PE ((uint32_t)0x00000001)
mbed_official 133:d4dda5c437f0 281 /**
mbed_official 133:d4dda5c437f0 282 * @}
mbed_official 133:d4dda5c437f0 283 */
mbed_official 133:d4dda5c437f0 284
mbed_official 133:d4dda5c437f0 285 /** @defgroup UART_Interrupt_definition
mbed_official 133:d4dda5c437f0 286 * Elements values convention: 0xY000XXXX
mbed_official 133:d4dda5c437f0 287 * - XXXX : Interrupt mask in the XX register
mbed_official 133:d4dda5c437f0 288 * - Y : Interrupt source register (2bits)
mbed_official 133:d4dda5c437f0 289 * - 01: CR1 register
mbed_official 133:d4dda5c437f0 290 * - 10: CR2 register
mbed_official 133:d4dda5c437f0 291 * - 11: CR3 register
mbed_official 133:d4dda5c437f0 292 *
mbed_official 133:d4dda5c437f0 293 * @{
mbed_official 133:d4dda5c437f0 294 */
mbed_official 133:d4dda5c437f0 295 #define UART_IT_PE ((uint32_t)0x10000100)
mbed_official 133:d4dda5c437f0 296 #define UART_IT_TXE ((uint32_t)0x10000080)
mbed_official 133:d4dda5c437f0 297 #define UART_IT_TC ((uint32_t)0x10000040)
mbed_official 133:d4dda5c437f0 298 #define UART_IT_RXNE ((uint32_t)0x10000020)
mbed_official 133:d4dda5c437f0 299 #define UART_IT_IDLE ((uint32_t)0x10000010)
mbed_official 133:d4dda5c437f0 300
mbed_official 133:d4dda5c437f0 301 #define UART_IT_LBD ((uint32_t)0x20000040)
mbed_official 133:d4dda5c437f0 302 #define UART_IT_CTS ((uint32_t)0x30000400)
mbed_official 242:7074e42da0b2 303
mbed_official 133:d4dda5c437f0 304 #define UART_IT_ERR ((uint32_t)0x30000001)
mbed_official 133:d4dda5c437f0 305
mbed_official 133:d4dda5c437f0 306 /**
mbed_official 133:d4dda5c437f0 307 * @}
mbed_official 133:d4dda5c437f0 308 */
mbed_official 242:7074e42da0b2 309
mbed_official 133:d4dda5c437f0 310 /**
mbed_official 133:d4dda5c437f0 311 * @}
mbed_official 133:d4dda5c437f0 312 */
mbed_official 133:d4dda5c437f0 313
mbed_official 133:d4dda5c437f0 314 /* Exported macro ------------------------------------------------------------*/
mbed_official 242:7074e42da0b2 315
mbed_official 242:7074e42da0b2 316 /** @brief Reset UART handle state
mbed_official 242:7074e42da0b2 317 * @param __HANDLE__: specifies the UART Handle.
mbed_official 242:7074e42da0b2 318 * This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or
mbed_official 242:7074e42da0b2 319 * UART peripheral.
mbed_official 242:7074e42da0b2 320 * @retval None
mbed_official 242:7074e42da0b2 321 */
mbed_official 242:7074e42da0b2 322 #define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_UART_STATE_RESET)
mbed_official 242:7074e42da0b2 323
mbed_official 242:7074e42da0b2 324 /** @brief Flushs the UART DR register
mbed_official 242:7074e42da0b2 325 * @param __HANDLE__: specifies the UART Handle.
mbed_official 242:7074e42da0b2 326 */
mbed_official 242:7074e42da0b2 327 #define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) ((__HANDLE__)->Instance->DR)
mbed_official 242:7074e42da0b2 328
mbed_official 133:d4dda5c437f0 329 /** @brief Checks whether the specified UART flag is set or not.
mbed_official 133:d4dda5c437f0 330 * @param __HANDLE__: specifies the UART Handle.
mbed_official 133:d4dda5c437f0 331 * This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or
mbed_official 133:d4dda5c437f0 332 * UART peripheral.
mbed_official 133:d4dda5c437f0 333 * @param __FLAG__: specifies the flag to check.
mbed_official 133:d4dda5c437f0 334 * This parameter can be one of the following values:
mbed_official 133:d4dda5c437f0 335 * @arg UART_FLAG_CTS: CTS Change flag (not available for UART4 and UART5)
mbed_official 133:d4dda5c437f0 336 * @arg UART_FLAG_LBD: LIN Break detection flag
mbed_official 133:d4dda5c437f0 337 * @arg UART_FLAG_TXE: Transmit data register empty flag
mbed_official 133:d4dda5c437f0 338 * @arg UART_FLAG_TC: Transmission Complete flag
mbed_official 133:d4dda5c437f0 339 * @arg UART_FLAG_RXNE: Receive data register not empty flag
mbed_official 133:d4dda5c437f0 340 * @arg UART_FLAG_IDLE: Idle Line detection flag
mbed_official 133:d4dda5c437f0 341 * @arg UART_FLAG_ORE: OverRun Error flag
mbed_official 133:d4dda5c437f0 342 * @arg UART_FLAG_NE: Noise Error flag
mbed_official 133:d4dda5c437f0 343 * @arg UART_FLAG_FE: Framing Error flag
mbed_official 133:d4dda5c437f0 344 * @arg UART_FLAG_PE: Parity Error flag
mbed_official 133:d4dda5c437f0 345 * @retval The new state of __FLAG__ (TRUE or FALSE).
mbed_official 133:d4dda5c437f0 346 */
mbed_official 133:d4dda5c437f0 347
mbed_official 133:d4dda5c437f0 348 #define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
mbed_official 133:d4dda5c437f0 349
mbed_official 133:d4dda5c437f0 350 /** @brief Clears the specified UART pending flag.
mbed_official 133:d4dda5c437f0 351 * @param __HANDLE__: specifies the UART Handle.
mbed_official 133:d4dda5c437f0 352 * This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or
mbed_official 133:d4dda5c437f0 353 * UART peripheral.
mbed_official 133:d4dda5c437f0 354 * @param __FLAG__: specifies the flag to check.
mbed_official 133:d4dda5c437f0 355 * This parameter can be any combination of the following values:
mbed_official 133:d4dda5c437f0 356 * @arg UART_FLAG_CTS: CTS Change flag (not available for UART4 and UART5).
mbed_official 133:d4dda5c437f0 357 * @arg UART_FLAG_LBD: LIN Break detection flag.
mbed_official 133:d4dda5c437f0 358 * @arg UART_FLAG_TC: Transmission Complete flag.
mbed_official 133:d4dda5c437f0 359 * @arg UART_FLAG_RXNE: Receive data register not empty flag.
mbed_official 133:d4dda5c437f0 360 *
mbed_official 133:d4dda5c437f0 361 * @note PE (Parity error), FE (Framing error), NE (Noise error), ORE (OverRun
mbed_official 133:d4dda5c437f0 362 * error) and IDLE (Idle line detected) flags are cleared by software
mbed_official 133:d4dda5c437f0 363 * sequence: a read operation to USART_SR register followed by a read
mbed_official 133:d4dda5c437f0 364 * operation to USART_DR register.
mbed_official 133:d4dda5c437f0 365 * @note RXNE flag can be also cleared by a read to the USART_DR register.
mbed_official 133:d4dda5c437f0 366 * @note TC flag can be also cleared by software sequence: a read operation to
mbed_official 133:d4dda5c437f0 367 * USART_SR register followed by a write operation to USART_DR register.
mbed_official 133:d4dda5c437f0 368 * @note TXE flag is cleared only by a write to the USART_DR register.
mbed_official 133:d4dda5c437f0 369 *
mbed_official 133:d4dda5c437f0 370 * @retval None
mbed_official 133:d4dda5c437f0 371 */
mbed_official 133:d4dda5c437f0 372 #define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR &= ~(__FLAG__))
mbed_official 133:d4dda5c437f0 373
mbed_official 133:d4dda5c437f0 374 /** @brief Enables or disables the specified UART interrupt.
mbed_official 133:d4dda5c437f0 375 * @param __HANDLE__: specifies the UART Handle.
mbed_official 133:d4dda5c437f0 376 * This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or
mbed_official 133:d4dda5c437f0 377 * UART peripheral.
mbed_official 133:d4dda5c437f0 378 * @param __INTERRUPT__: specifies the UART interrupt source to check.
mbed_official 133:d4dda5c437f0 379 * This parameter can be one of the following values:
mbed_official 133:d4dda5c437f0 380 * @arg UART_IT_CTS: CTS change interrupt
mbed_official 133:d4dda5c437f0 381 * @arg UART_IT_LBD: LIN Break detection interrupt
mbed_official 133:d4dda5c437f0 382 * @arg UART_IT_TXE: Transmit Data Register empty interrupt
mbed_official 133:d4dda5c437f0 383 * @arg UART_IT_TC: Transmission complete interrupt
mbed_official 133:d4dda5c437f0 384 * @arg UART_IT_RXNE: Receive Data register not empty interrupt
mbed_official 133:d4dda5c437f0 385 * @arg UART_IT_IDLE: Idle line detection interrupt
mbed_official 133:d4dda5c437f0 386 * @arg UART_IT_PE: Parity Error interrupt
mbed_official 133:d4dda5c437f0 387 * @arg UART_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
mbed_official 133:d4dda5c437f0 388 * @param NewState: new state of the specified UART interrupt.
mbed_official 133:d4dda5c437f0 389 * This parameter can be: ENABLE or DISABLE.
mbed_official 133:d4dda5c437f0 390 * @retval None
mbed_official 133:d4dda5c437f0 391 */
mbed_official 133:d4dda5c437f0 392 #define UART_IT_MASK ((uint32_t)0x0000FFFF)
mbed_official 133:d4dda5c437f0 393 #define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((((__INTERRUPT__) >> 28) == 1)? ((__HANDLE__)->Instance->CR1 |= ((__INTERRUPT__) & UART_IT_MASK)): \
mbed_official 133:d4dda5c437f0 394 (((__INTERRUPT__) >> 28) == 2)? ((__HANDLE__)->Instance->CR2 |= ((__INTERRUPT__) & UART_IT_MASK)): \
mbed_official 133:d4dda5c437f0 395 ((__HANDLE__)->Instance->CR3 |= ((__INTERRUPT__) & UART_IT_MASK)))
mbed_official 133:d4dda5c437f0 396 #define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((((__INTERRUPT__) >> 28) == 1)? ((__HANDLE__)->Instance->CR1 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
mbed_official 133:d4dda5c437f0 397 (((__INTERRUPT__) >> 28) == 2)? ((__HANDLE__)->Instance->CR2 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
mbed_official 133:d4dda5c437f0 398 ((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & UART_IT_MASK)))
mbed_official 133:d4dda5c437f0 399
mbed_official 133:d4dda5c437f0 400 /** @brief Checks whether the specified UART interrupt has occurred or not.
mbed_official 133:d4dda5c437f0 401 * @param __HANDLE__: specifies the UART Handle.
mbed_official 133:d4dda5c437f0 402 * This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or
mbed_official 133:d4dda5c437f0 403 * UART peripheral.
mbed_official 133:d4dda5c437f0 404 * @param __IT__: specifies the UART interrupt source to check.
mbed_official 133:d4dda5c437f0 405 * This parameter can be one of the following values:
mbed_official 133:d4dda5c437f0 406 * @arg UART_IT_CTS: CTS change interrupt (not available for UART4 and UART5)
mbed_official 133:d4dda5c437f0 407 * @arg UART_IT_LBD: LIN Break detection interrupt
mbed_official 133:d4dda5c437f0 408 * @arg UART_IT_TXE: Transmit Data Register empty interrupt
mbed_official 133:d4dda5c437f0 409 * @arg UART_IT_TC: Transmission complete interrupt
mbed_official 133:d4dda5c437f0 410 * @arg UART_IT_RXNE: Receive Data register not empty interrupt
mbed_official 133:d4dda5c437f0 411 * @arg UART_IT_IDLE: Idle line detection interrupt
mbed_official 133:d4dda5c437f0 412 * @arg USART_IT_ERR: Error interrupt
mbed_official 133:d4dda5c437f0 413 * @retval The new state of __IT__ (TRUE or FALSE).
mbed_official 133:d4dda5c437f0 414 */
mbed_official 133:d4dda5c437f0 415 #define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __IT__) (((((__IT__) >> 28) == 1)? (__HANDLE__)->Instance->CR1:(((((uint32_t)(__IT__)) >> 28) == 2)? \
mbed_official 133:d4dda5c437f0 416 (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & (((uint32_t)(__IT__)) & UART_IT_MASK))
mbed_official 133:d4dda5c437f0 417
mbed_official 133:d4dda5c437f0 418 /** @brief macros to enables or disables the UART's one bit sampling method
mbed_official 133:d4dda5c437f0 419 * @param __HANDLE__: specifies the UART Handle.
mbed_official 133:d4dda5c437f0 420 * @retval None
mbed_official 133:d4dda5c437f0 421 */
mbed_official 133:d4dda5c437f0 422 #define __HAL_UART_ONEBIT_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
mbed_official 133:d4dda5c437f0 423 #define __HAL_UART_ONEBIT_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT))
mbed_official 133:d4dda5c437f0 424
mbed_official 133:d4dda5c437f0 425 #define __HAL_UART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
mbed_official 133:d4dda5c437f0 426 #define __HAL_UART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
mbed_official 133:d4dda5c437f0 427
mbed_official 133:d4dda5c437f0 428 #define __DIV_SAMPLING16(_PCLK_, _BAUD_) (((_PCLK_)*25)/(4*(_BAUD_)))
mbed_official 133:d4dda5c437f0 429 #define __DIVMANT_SAMPLING16(_PCLK_, _BAUD_) (__DIV_SAMPLING16((_PCLK_), (_BAUD_))/100)
mbed_official 133:d4dda5c437f0 430 #define __DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_) (((__DIV_SAMPLING16((_PCLK_), (_BAUD_)) - (__DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) * 100)) * 16 + 50) / 100)
mbed_official 133:d4dda5c437f0 431 #define __UART_BRR_SAMPLING16(_PCLK_, _BAUD_) ((__DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) << 4)|(__DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0x0F))
mbed_official 133:d4dda5c437f0 432
mbed_official 133:d4dda5c437f0 433 #define __DIV_SAMPLING8(_PCLK_, _BAUD_) (((_PCLK_)*25)/(2*(_BAUD_)))
mbed_official 133:d4dda5c437f0 434 #define __DIVMANT_SAMPLING8(_PCLK_, _BAUD_) (__DIV_SAMPLING8((_PCLK_), (_BAUD_))/100)
mbed_official 133:d4dda5c437f0 435 #define __DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_) (((__DIV_SAMPLING8((_PCLK_), (_BAUD_)) - (__DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) * 100)) * 16 + 50) / 100)
mbed_official 133:d4dda5c437f0 436 #define __UART_BRR_SAMPLING8(_PCLK_, _BAUD_) ((__DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) << 4)|(__DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0x0F))
mbed_official 133:d4dda5c437f0 437
mbed_official 133:d4dda5c437f0 438 #define IS_UART_BAUDRATE(BAUDRATE) ((BAUDRATE) < 10500001)
mbed_official 133:d4dda5c437f0 439 #define IS_UART_ADDRESS(ADDRESS) ((ADDRESS) <= 0xF)
mbed_official 133:d4dda5c437f0 440
mbed_official 133:d4dda5c437f0 441 /* Exported functions --------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 442 /* Initialization/de-initialization functions **********************************/
mbed_official 133:d4dda5c437f0 443 HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 444 HAL_StatusTypeDef HAL_HalfDuplex_Init(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 445 HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength);
mbed_official 133:d4dda5c437f0 446 HAL_StatusTypeDef HAL_MultiProcessor_Init(UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethode);
mbed_official 133:d4dda5c437f0 447 HAL_StatusTypeDef HAL_UART_DeInit (UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 448 void HAL_UART_MspInit(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 449 void HAL_UART_MspDeInit(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 450
mbed_official 133:d4dda5c437f0 451 /* IO operation functions *******************************************************/
mbed_official 133:d4dda5c437f0 452 HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
mbed_official 133:d4dda5c437f0 453 HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
mbed_official 133:d4dda5c437f0 454 HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
mbed_official 133:d4dda5c437f0 455 HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
mbed_official 133:d4dda5c437f0 456 HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
mbed_official 133:d4dda5c437f0 457 HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
mbed_official 133:d4dda5c437f0 458 HAL_StatusTypeDef HAL_UART_DMAPause(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 459 HAL_StatusTypeDef HAL_UART_DMAResume(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 460 HAL_StatusTypeDef HAL_UART_DMAStop(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 461 void HAL_UART_IRQHandler(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 462 void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 463 void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 464 void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 465 void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 466 void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 467
mbed_official 133:d4dda5c437f0 468 /* Peripheral Control functions ************************************************/
mbed_official 133:d4dda5c437f0 469 HAL_StatusTypeDef HAL_LIN_SendBreak(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 470 HAL_StatusTypeDef HAL_MultiProcessor_EnterMuteMode(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 471 HAL_StatusTypeDef HAL_MultiProcessor_ExitMuteMode(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 472 HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 473 HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 474
mbed_official 133:d4dda5c437f0 475 /* Peripheral State functions **************************************************/
mbed_official 133:d4dda5c437f0 476 HAL_UART_StateTypeDef HAL_UART_GetState(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 477 uint32_t HAL_UART_GetError(UART_HandleTypeDef *huart);
mbed_official 133:d4dda5c437f0 478
mbed_official 133:d4dda5c437f0 479 /**
mbed_official 133:d4dda5c437f0 480 * @}
mbed_official 133:d4dda5c437f0 481 */
mbed_official 133:d4dda5c437f0 482
mbed_official 133:d4dda5c437f0 483 /**
mbed_official 133:d4dda5c437f0 484 * @}
mbed_official 133:d4dda5c437f0 485 */
mbed_official 133:d4dda5c437f0 486
mbed_official 133:d4dda5c437f0 487 #ifdef __cplusplus
mbed_official 133:d4dda5c437f0 488 }
mbed_official 133:d4dda5c437f0 489 #endif
mbed_official 133:d4dda5c437f0 490
mbed_official 133:d4dda5c437f0 491 #endif /* __STM32F4xx_HAL_UART_H */
mbed_official 133:d4dda5c437f0 492
mbed_official 133:d4dda5c437f0 493 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/