mbed library sources

Fork of mbed-src by mbed official

Committer:
moirans2
Date:
Wed Jan 14 20:53:08 2015 +0000
Revision:
445:9a3ffe6cfa19
Parent:
441:d2c15dda23c1
internal clock stm32L051

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 340:28d1f895c6fe 1 /**
mbed_official 340:28d1f895c6fe 2 ******************************************************************************
mbed_official 340:28d1f895c6fe 3 * @file stm32f0xx_hal_uart_ex.h
mbed_official 340:28d1f895c6fe 4 * @author MCD Application Team
mbed_official 441:d2c15dda23c1 5 * @version V1.2.0
mbed_official 441:d2c15dda23c1 6 * @date 11-December-2014
mbed_official 340:28d1f895c6fe 7 * @brief Header file of UART HAL Extension module.
mbed_official 340:28d1f895c6fe 8 ******************************************************************************
mbed_official 340:28d1f895c6fe 9 * @attention
mbed_official 340:28d1f895c6fe 10 *
mbed_official 340:28d1f895c6fe 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 340:28d1f895c6fe 12 *
mbed_official 340:28d1f895c6fe 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 340:28d1f895c6fe 14 * are permitted provided that the following conditions are met:
mbed_official 340:28d1f895c6fe 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 340:28d1f895c6fe 16 * this list of conditions and the following disclaimer.
mbed_official 340:28d1f895c6fe 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 340:28d1f895c6fe 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 340:28d1f895c6fe 19 * and/or other materials provided with the distribution.
mbed_official 340:28d1f895c6fe 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 340:28d1f895c6fe 21 * may be used to endorse or promote products derived from this software
mbed_official 340:28d1f895c6fe 22 * without specific prior written permission.
mbed_official 340:28d1f895c6fe 23 *
mbed_official 340:28d1f895c6fe 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 340:28d1f895c6fe 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 340:28d1f895c6fe 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 340:28d1f895c6fe 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 340:28d1f895c6fe 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 340:28d1f895c6fe 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 340:28d1f895c6fe 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 340:28d1f895c6fe 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 340:28d1f895c6fe 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 340:28d1f895c6fe 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 340:28d1f895c6fe 34 *
mbed_official 340:28d1f895c6fe 35 ******************************************************************************
mbed_official 340:28d1f895c6fe 36 */
mbed_official 340:28d1f895c6fe 37
mbed_official 340:28d1f895c6fe 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 340:28d1f895c6fe 39 #ifndef __STM32F0xx_HAL_UART_EX_H
mbed_official 340:28d1f895c6fe 40 #define __STM32F0xx_HAL_UART_EX_H
mbed_official 340:28d1f895c6fe 41
mbed_official 340:28d1f895c6fe 42 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 43 extern "C" {
mbed_official 340:28d1f895c6fe 44 #endif
mbed_official 340:28d1f895c6fe 45
mbed_official 340:28d1f895c6fe 46 /* Includes ------------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 47 #include "stm32f0xx_hal_def.h"
mbed_official 340:28d1f895c6fe 48
mbed_official 340:28d1f895c6fe 49 /** @addtogroup STM32F0xx_HAL_Driver
mbed_official 340:28d1f895c6fe 50 * @{
mbed_official 340:28d1f895c6fe 51 */
mbed_official 340:28d1f895c6fe 52
mbed_official 340:28d1f895c6fe 53 /** @addtogroup UARTEx
mbed_official 340:28d1f895c6fe 54 * @{
mbed_official 340:28d1f895c6fe 55 */
mbed_official 340:28d1f895c6fe 56
mbed_official 340:28d1f895c6fe 57 /* Exported types ------------------------------------------------------------*/
mbed_official 441:d2c15dda23c1 58 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 441:d2c15dda23c1 59 /** @defgroup UARTEx_Exported_Types UARTEx Exported Types
mbed_official 441:d2c15dda23c1 60 * @{
mbed_official 441:d2c15dda23c1 61 */
mbed_official 441:d2c15dda23c1 62
mbed_official 441:d2c15dda23c1 63 /**
mbed_official 441:d2c15dda23c1 64 * @brief UART wake up from stop mode parameters
mbed_official 441:d2c15dda23c1 65 */
mbed_official 441:d2c15dda23c1 66 typedef struct
mbed_official 441:d2c15dda23c1 67 {
mbed_official 441:d2c15dda23c1 68 uint32_t WakeUpEvent; /*!< Specifies which event will activat the Wakeup from Stop mode flag (WUF).
mbed_official 441:d2c15dda23c1 69 This parameter can be a value of @ref UART_WakeUp_from_Stop_Selection.
mbed_official 441:d2c15dda23c1 70 If set to UART_WAKEUP_ON_ADDRESS, the two other fields below must
mbed_official 441:d2c15dda23c1 71 be filled up. */
mbed_official 441:d2c15dda23c1 72
mbed_official 441:d2c15dda23c1 73 uint16_t AddressLength; /*!< Specifies whether the address is 4 or 7-bit long.
mbed_official 441:d2c15dda23c1 74 This parameter can be a value of @ref UART_WakeUp_Address_Length */
mbed_official 441:d2c15dda23c1 75
mbed_official 441:d2c15dda23c1 76 uint8_t Address; /*!< UART/USART node address (7-bit long max) */
mbed_official 441:d2c15dda23c1 77 } UART_WakeUpTypeDef;
mbed_official 441:d2c15dda23c1 78 /**
mbed_official 441:d2c15dda23c1 79 * @}
mbed_official 441:d2c15dda23c1 80 */
mbed_official 441:d2c15dda23c1 81 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 441:d2c15dda23c1 82
mbed_official 340:28d1f895c6fe 83 /* Exported constants --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 84 /** @defgroup UARTEx_Exported_Constants UARTEx Exported Constants
mbed_official 340:28d1f895c6fe 85 * @{
mbed_official 340:28d1f895c6fe 86 */
mbed_official 340:28d1f895c6fe 87
mbed_official 340:28d1f895c6fe 88 /** @defgroup UARTEx_Word_Length UARTEx Word Length
mbed_official 340:28d1f895c6fe 89 * @{
mbed_official 340:28d1f895c6fe 90 */
mbed_official 441:d2c15dda23c1 91 #if defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6) || \
mbed_official 441:d2c15dda23c1 92 defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || defined (STM32F070xB) || \
mbed_official 441:d2c15dda23c1 93 defined (STM32F091xC) || defined (STM32F098xx) || defined (STM32F030xC)
mbed_official 340:28d1f895c6fe 94 #define UART_WORDLENGTH_7B ((uint32_t)USART_CR1_M1)
mbed_official 340:28d1f895c6fe 95 #define UART_WORDLENGTH_8B ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 96 #define UART_WORDLENGTH_9B ((uint32_t)USART_CR1_M0)
mbed_official 340:28d1f895c6fe 97 #define IS_UART_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_7B) || \
mbed_official 340:28d1f895c6fe 98 ((LENGTH) == UART_WORDLENGTH_8B) || \
mbed_official 340:28d1f895c6fe 99 ((LENGTH) == UART_WORDLENGTH_9B))
mbed_official 340:28d1f895c6fe 100 #else
mbed_official 340:28d1f895c6fe 101 #define UART_WORDLENGTH_8B ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 102 #define UART_WORDLENGTH_9B ((uint32_t)USART_CR1_M)
mbed_official 340:28d1f895c6fe 103 #define IS_UART_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B) || \
mbed_official 340:28d1f895c6fe 104 ((LENGTH) == UART_WORDLENGTH_9B))
mbed_official 441:d2c15dda23c1 105 #endif /* defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6) || \
mbed_official 441:d2c15dda23c1 106 defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || defined (STM32F070xB) || \
mbed_official 441:d2c15dda23c1 107 defined (STM32F091xC) || defined (STM32F098xx) || defined (STM32F030xC) */
mbed_official 340:28d1f895c6fe 108 /**
mbed_official 340:28d1f895c6fe 109 * @}
mbed_official 340:28d1f895c6fe 110 */
mbed_official 340:28d1f895c6fe 111
mbed_official 340:28d1f895c6fe 112 /** @defgroup UARTEx_AutoBaud_Rate_Mode UARTEx Advanced Feature AutoBaud Rate Mode
mbed_official 340:28d1f895c6fe 113 * @{
mbed_official 340:28d1f895c6fe 114 */
mbed_official 441:d2c15dda23c1 115 #if defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6) || \
mbed_official 441:d2c15dda23c1 116 defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || defined (STM32F070xB) || \
mbed_official 441:d2c15dda23c1 117 defined (STM32F091xC) || defined (STM32F098xx) || defined (STM32F030xC)
mbed_official 340:28d1f895c6fe 118 #define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT ((uint32_t)0x0000)
mbed_official 340:28d1f895c6fe 119 #define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE ((uint32_t)USART_CR2_ABRMODE_0)
mbed_official 340:28d1f895c6fe 120 #define UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME ((uint32_t)USART_CR2_ABRMODE_1)
mbed_official 340:28d1f895c6fe 121 #define UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME ((uint32_t)USART_CR2_ABRMODE)
mbed_official 340:28d1f895c6fe 122 #define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(MODE) (((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT) || \
mbed_official 340:28d1f895c6fe 123 ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE) || \
mbed_official 340:28d1f895c6fe 124 ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME) || \
mbed_official 340:28d1f895c6fe 125 ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME))
mbed_official 340:28d1f895c6fe 126 #else
mbed_official 340:28d1f895c6fe 127 #define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT ((uint32_t)0x0000)
mbed_official 340:28d1f895c6fe 128 #define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE ((uint32_t)USART_CR2_ABRMODE_0)
mbed_official 340:28d1f895c6fe 129 #define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(MODE) (((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT) || \
mbed_official 340:28d1f895c6fe 130 ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE))
mbed_official 441:d2c15dda23c1 131 #endif /* defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6) || \
mbed_official 441:d2c15dda23c1 132 defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || defined (STM32F070xB) || \
mbed_official 441:d2c15dda23c1 133 defined (STM32F091xC) || defined (STM32F098xx) || defined (STM32F030xC) */
mbed_official 340:28d1f895c6fe 134 /**
mbed_official 340:28d1f895c6fe 135 * @}
mbed_official 340:28d1f895c6fe 136 */
mbed_official 340:28d1f895c6fe 137
mbed_official 340:28d1f895c6fe 138
mbed_official 441:d2c15dda23c1 139 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 140 /** @defgroup UARTEx_LIN UARTEx Local Interconnection Network mode
mbed_official 340:28d1f895c6fe 141 * @{
mbed_official 340:28d1f895c6fe 142 */
mbed_official 340:28d1f895c6fe 143 #define UART_LIN_DISABLE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 144 #define UART_LIN_ENABLE ((uint32_t)USART_CR2_LINEN)
mbed_official 340:28d1f895c6fe 145 #define IS_UART_LIN(LIN) (((LIN) == UART_LIN_DISABLE) || \
mbed_official 340:28d1f895c6fe 146 ((LIN) == UART_LIN_ENABLE))
mbed_official 340:28d1f895c6fe 147 /**
mbed_official 340:28d1f895c6fe 148 * @}
mbed_official 340:28d1f895c6fe 149 */
mbed_official 340:28d1f895c6fe 150
mbed_official 340:28d1f895c6fe 151 /** @defgroup UARTEx_LIN_Break_Detection UARTEx LIN Break Detection
mbed_official 340:28d1f895c6fe 152 * @{
mbed_official 340:28d1f895c6fe 153 */
mbed_official 340:28d1f895c6fe 154 #define UART_LINBREAKDETECTLENGTH_10B ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 155 #define UART_LINBREAKDETECTLENGTH_11B ((uint32_t)USART_CR2_LBDL)
mbed_official 340:28d1f895c6fe 156 #define IS_UART_LIN_BREAK_DETECT_LENGTH(LENGTH) (((LENGTH) == UART_LINBREAKDETECTLENGTH_10B) || \
mbed_official 340:28d1f895c6fe 157 ((LENGTH) == UART_LINBREAKDETECTLENGTH_11B))
mbed_official 340:28d1f895c6fe 158 /**
mbed_official 340:28d1f895c6fe 159 * @}
mbed_official 340:28d1f895c6fe 160 */
mbed_official 441:d2c15dda23c1 161 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 162
mbed_official 340:28d1f895c6fe 163 /** @defgroup UART_Flags UARTEx Status Flags
mbed_official 340:28d1f895c6fe 164 * Elements values convention: 0xXXXX
mbed_official 340:28d1f895c6fe 165 * - 0xXXXX : Flag mask in the ISR register
mbed_official 340:28d1f895c6fe 166 * @{
mbed_official 340:28d1f895c6fe 167 */
mbed_official 340:28d1f895c6fe 168 #define UART_FLAG_REACK ((uint32_t)0x00400000)
mbed_official 340:28d1f895c6fe 169 #define UART_FLAG_TEACK ((uint32_t)0x00200000)
mbed_official 441:d2c15dda23c1 170 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 171 #define UART_FLAG_WUF ((uint32_t)0x00100000)
mbed_official 441:d2c15dda23c1 172 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 173 #define UART_FLAG_RWU ((uint32_t)0x00080000)
mbed_official 340:28d1f895c6fe 174 #define UART_FLAG_SBKF ((uint32_t)0x00040000
mbed_official 340:28d1f895c6fe 175 #define UART_FLAG_CMF ((uint32_t)0x00020000)
mbed_official 340:28d1f895c6fe 176 #define UART_FLAG_BUSY ((uint32_t)0x00010000)
mbed_official 340:28d1f895c6fe 177 #define UART_FLAG_ABRF ((uint32_t)0x00008000)
mbed_official 340:28d1f895c6fe 178 #define UART_FLAG_ABRE ((uint32_t)0x00004000)
mbed_official 441:d2c15dda23c1 179 #if !defined(STM32F030x6) && !defined(STM32F030x8)
mbed_official 340:28d1f895c6fe 180 #define UART_FLAG_EOBF ((uint32_t)0x00001000)
mbed_official 340:28d1f895c6fe 181 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) */
mbed_official 340:28d1f895c6fe 182 #define UART_FLAG_RTOF ((uint32_t)0x00000800)
mbed_official 340:28d1f895c6fe 183 #define UART_FLAG_CTS ((uint32_t)0x00000400)
mbed_official 340:28d1f895c6fe 184 #define UART_FLAG_CTSIF ((uint32_t)0x00000200)
mbed_official 441:d2c15dda23c1 185 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 186 #define UART_FLAG_LBDF ((uint32_t)0x00000100)
mbed_official 441:d2c15dda23c1 187 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 188 #define UART_FLAG_TXE ((uint32_t)0x00000080)
mbed_official 340:28d1f895c6fe 189 #define UART_FLAG_TC ((uint32_t)0x00000040)
mbed_official 340:28d1f895c6fe 190 #define UART_FLAG_RXNE ((uint32_t)0x00000020)
mbed_official 340:28d1f895c6fe 191 #define UART_FLAG_IDLE ((uint32_t)0x00000010)
mbed_official 340:28d1f895c6fe 192 #define UART_FLAG_ORE ((uint32_t)0x00000008)
mbed_official 340:28d1f895c6fe 193 #define UART_FLAG_NE ((uint32_t)0x00000004)
mbed_official 340:28d1f895c6fe 194 #define UART_FLAG_FE ((uint32_t)0x00000002)
mbed_official 340:28d1f895c6fe 195 #define UART_FLAG_PE ((uint32_t)0x00000001)
mbed_official 340:28d1f895c6fe 196 /**
mbed_official 340:28d1f895c6fe 197 * @}
mbed_official 340:28d1f895c6fe 198 */
mbed_official 340:28d1f895c6fe 199
mbed_official 340:28d1f895c6fe 200 /** @defgroup UART_Interrupt_definition UARTEx Interrupts Definition
mbed_official 441:d2c15dda23c1 201 * Elements values convention: 0000ZZZZZ0XXYYYYYb
mbed_official 340:28d1f895c6fe 202 * - YYYYY : Interrupt source position in the XX register (5bits)
mbed_official 340:28d1f895c6fe 203 * - XX : Interrupt source register (2bits)
mbed_official 340:28d1f895c6fe 204 * - 01: CR1 register
mbed_official 340:28d1f895c6fe 205 * - 10: CR2 register
mbed_official 340:28d1f895c6fe 206 * - 11: CR3 register
mbed_official 441:d2c15dda23c1 207 * - ZZZZZ : Flag position in the ISR register(5bits)
mbed_official 340:28d1f895c6fe 208 * @{
mbed_official 340:28d1f895c6fe 209 */
mbed_official 340:28d1f895c6fe 210 #define UART_IT_PE ((uint16_t)0x0028)
mbed_official 340:28d1f895c6fe 211 #define UART_IT_TXE ((uint16_t)0x0727)
mbed_official 340:28d1f895c6fe 212 #define UART_IT_TC ((uint16_t)0x0626)
mbed_official 340:28d1f895c6fe 213 #define UART_IT_RXNE ((uint16_t)0x0525)
mbed_official 340:28d1f895c6fe 214 #define UART_IT_IDLE ((uint16_t)0x0424)
mbed_official 441:d2c15dda23c1 215 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 216 #define UART_IT_LBD ((uint16_t)0x0846)
mbed_official 441:d2c15dda23c1 217 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 218 #define UART_IT_CTS ((uint16_t)0x096A)
mbed_official 441:d2c15dda23c1 219 #define UART_IT_CM ((uint16_t)0x112E)
mbed_official 441:d2c15dda23c1 220 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 221 #define UART_IT_WUF ((uint16_t)0x1476)
mbed_official 441:d2c15dda23c1 222 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 223 /**
mbed_official 340:28d1f895c6fe 224 * @}
mbed_official 340:28d1f895c6fe 225 */
mbed_official 340:28d1f895c6fe 226
mbed_official 340:28d1f895c6fe 227
mbed_official 340:28d1f895c6fe 228 /** @defgroup UART_IT_CLEAR_Flags UARTEx Interruption Clear Flags
mbed_official 340:28d1f895c6fe 229 * @{
mbed_official 340:28d1f895c6fe 230 */
mbed_official 340:28d1f895c6fe 231 #define UART_CLEAR_PEF USART_ICR_PECF /*!< Parity Error Clear Flag */
mbed_official 340:28d1f895c6fe 232 #define UART_CLEAR_FEF USART_ICR_FECF /*!< Framing Error Clear Flag */
mbed_official 340:28d1f895c6fe 233 #define UART_CLEAR_NEF USART_ICR_NCF /*!< Noise detected Clear Flag */
mbed_official 340:28d1f895c6fe 234 #define UART_CLEAR_OREF USART_ICR_ORECF /*!< OverRun Error Clear Flag */
mbed_official 340:28d1f895c6fe 235 #define UART_CLEAR_IDLEF USART_ICR_IDLECF /*!< IDLE line detected Clear Flag */
mbed_official 340:28d1f895c6fe 236 #define UART_CLEAR_TCF USART_ICR_TCCF /*!< Transmission Complete Clear Flag */
mbed_official 441:d2c15dda23c1 237 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 238 #define UART_CLEAR_LBDF USART_ICR_LBDCF /*!< LIN Break Detection Clear Flag (not available on F030xx devices)*/
mbed_official 441:d2c15dda23c1 239 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 240 #define UART_CLEAR_CTSF USART_ICR_CTSCF /*!< CTS Interrupt Clear Flag */
mbed_official 340:28d1f895c6fe 241 #define UART_CLEAR_RTOF USART_ICR_RTOCF /*!< Receiver Time Out Clear Flag */
mbed_official 340:28d1f895c6fe 242 #define UART_CLEAR_EOBF USART_ICR_EOBCF /*!< End Of Block Clear Flag */
mbed_official 340:28d1f895c6fe 243 #define UART_CLEAR_CMF USART_ICR_CMCF /*!< Character Match Clear Flag */
mbed_official 441:d2c15dda23c1 244 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 245 #define UART_CLEAR_WUF USART_ICR_WUCF /*!< Wake Up from stop mode Clear Flag */
mbed_official 441:d2c15dda23c1 246 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 247 /**
mbed_official 340:28d1f895c6fe 248 * @}
mbed_official 340:28d1f895c6fe 249 */
mbed_official 340:28d1f895c6fe 250
mbed_official 340:28d1f895c6fe 251 /** @defgroup UART_Request_Parameters UARTEx Request Parameters
mbed_official 340:28d1f895c6fe 252 * @{
mbed_official 340:28d1f895c6fe 253 */
mbed_official 340:28d1f895c6fe 254 #define UART_AUTOBAUD_REQUEST ((uint32_t)USART_RQR_ABRRQ) /*!< Auto-Baud Rate Request */
mbed_official 340:28d1f895c6fe 255 #define UART_SENDBREAK_REQUEST ((uint32_t)USART_RQR_SBKRQ) /*!< Send Break Request */
mbed_official 340:28d1f895c6fe 256 #define UART_MUTE_MODE_REQUEST ((uint32_t)USART_RQR_MMRQ) /*!< Mute Mode Request */
mbed_official 340:28d1f895c6fe 257 #define UART_RXDATA_FLUSH_REQUEST ((uint32_t)USART_RQR_RXFRQ) /*!< Receive Data flush Request */
mbed_official 340:28d1f895c6fe 258 #if !defined(STM32F030x6) && !defined(STM32F030x8)
mbed_official 340:28d1f895c6fe 259 #define UART_TXDATA_FLUSH_REQUEST ((uint32_t)USART_RQR_TXFRQ) /*!< Transmit data flush Request */
mbed_official 340:28d1f895c6fe 260 #define IS_UART_REQUEST_PARAMETER(PARAM) (((PARAM) == UART_AUTOBAUD_REQUEST) || \
mbed_official 340:28d1f895c6fe 261 ((PARAM) == UART_SENDBREAK_REQUEST) || \
mbed_official 340:28d1f895c6fe 262 ((PARAM) == UART_MUTE_MODE_REQUEST) || \
mbed_official 340:28d1f895c6fe 263 ((PARAM) == UART_RXDATA_FLUSH_REQUEST) || \
mbed_official 340:28d1f895c6fe 264 ((PARAM) == UART_TXDATA_FLUSH_REQUEST))
mbed_official 340:28d1f895c6fe 265 #else
mbed_official 340:28d1f895c6fe 266 #define IS_UART_REQUEST_PARAMETER(PARAM) (((PARAM) == UART_AUTOBAUD_REQUEST) || \
mbed_official 340:28d1f895c6fe 267 ((PARAM) == UART_SENDBREAK_REQUEST) || \
mbed_official 340:28d1f895c6fe 268 ((PARAM) == UART_MUTE_MODE_REQUEST) || \
mbed_official 340:28d1f895c6fe 269 ((PARAM) == UART_RXDATA_FLUSH_REQUEST))
mbed_official 340:28d1f895c6fe 270 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) */
mbed_official 340:28d1f895c6fe 271 /**
mbed_official 340:28d1f895c6fe 272 * @}
mbed_official 340:28d1f895c6fe 273 */
mbed_official 340:28d1f895c6fe 274
mbed_official 441:d2c15dda23c1 275 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 276 /** @defgroup UART_Stop_Mode_Enable UARTEx Advanced Feature Stop Mode Enable
mbed_official 340:28d1f895c6fe 277 * @{
mbed_official 340:28d1f895c6fe 278 */
mbed_official 340:28d1f895c6fe 279 #define UART_ADVFEATURE_STOPMODE_DISABLE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 280 #define UART_ADVFEATURE_STOPMODE_ENABLE ((uint32_t)USART_CR1_UESM)
mbed_official 340:28d1f895c6fe 281 #define IS_UART_ADVFEATURE_STOPMODE(STOPMODE) (((STOPMODE) == UART_ADVFEATURE_STOPMODE_DISABLE) || \
mbed_official 340:28d1f895c6fe 282 ((STOPMODE) == UART_ADVFEATURE_STOPMODE_ENABLE))
mbed_official 340:28d1f895c6fe 283 /**
mbed_official 340:28d1f895c6fe 284 * @}
mbed_official 340:28d1f895c6fe 285 */
mbed_official 340:28d1f895c6fe 286
mbed_official 340:28d1f895c6fe 287 /** @defgroup UART_WakeUp_from_Stop_Selection UART WakeUp From Stop Selection
mbed_official 340:28d1f895c6fe 288 * @{
mbed_official 340:28d1f895c6fe 289 */
mbed_official 340:28d1f895c6fe 290 #define UART_WAKEUP_ON_ADDRESS ((uint32_t)0x0000)
mbed_official 340:28d1f895c6fe 291 #define UART_WAKEUP_ON_STARTBIT ((uint32_t)USART_CR3_WUS_1)
mbed_official 340:28d1f895c6fe 292 #define UART_WAKEUP_ON_READDATA_NONEMPTY ((uint32_t)USART_CR3_WUS)
mbed_official 340:28d1f895c6fe 293 #define IS_UART_WAKEUP_SELECTION(WAKE) (((WAKE) == UART_WAKEUP_ON_ADDRESS) || \
mbed_official 340:28d1f895c6fe 294 ((WAKE) == UART_WAKEUP_ON_STARTBIT) || \
mbed_official 340:28d1f895c6fe 295 ((WAKE) == UART_WAKEUP_ON_READDATA_NONEMPTY))
mbed_official 340:28d1f895c6fe 296 /**
mbed_official 340:28d1f895c6fe 297 * @}
mbed_official 340:28d1f895c6fe 298 */
mbed_official 441:d2c15dda23c1 299 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 300
mbed_official 340:28d1f895c6fe 301 /**
mbed_official 340:28d1f895c6fe 302 * @}
mbed_official 340:28d1f895c6fe 303 */
mbed_official 340:28d1f895c6fe 304
mbed_official 340:28d1f895c6fe 305 /* Exported macro ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 306
mbed_official 340:28d1f895c6fe 307 /** @defgroup UARTEx_Exported_Macros UARTEx Exported Macros
mbed_official 340:28d1f895c6fe 308 * @{
mbed_official 340:28d1f895c6fe 309 */
mbed_official 340:28d1f895c6fe 310
mbed_official 340:28d1f895c6fe 311 /** @brief Reports the UART clock source.
mbed_official 340:28d1f895c6fe 312 * @param __HANDLE__: specifies the UART Handle
mbed_official 340:28d1f895c6fe 313 * @param __CLOCKSOURCE__ : output variable
mbed_official 340:28d1f895c6fe 314 * @retval UART clocking source, written in __CLOCKSOURCE__.
mbed_official 340:28d1f895c6fe 315 */
mbed_official 340:28d1f895c6fe 316
mbed_official 340:28d1f895c6fe 317
mbed_official 340:28d1f895c6fe 318 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx)
mbed_official 340:28d1f895c6fe 319 #define __HAL_UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 340:28d1f895c6fe 320 do { \
mbed_official 340:28d1f895c6fe 321 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 340:28d1f895c6fe 322 { \
mbed_official 340:28d1f895c6fe 323 case RCC_USART1CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 324 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 325 break; \
mbed_official 340:28d1f895c6fe 326 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 327 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 328 break; \
mbed_official 340:28d1f895c6fe 329 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 330 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 331 break; \
mbed_official 340:28d1f895c6fe 332 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 333 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 334 break; \
mbed_official 340:28d1f895c6fe 335 default: \
mbed_official 340:28d1f895c6fe 336 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 337 break; \
mbed_official 340:28d1f895c6fe 338 } \
mbed_official 340:28d1f895c6fe 339 } while(0)
mbed_official 441:d2c15dda23c1 340 #elif defined (STM32F030x8) || defined (STM32F070x6) || \
mbed_official 340:28d1f895c6fe 341 defined (STM32F042x6) || defined (STM32F048xx) || \
mbed_official 340:28d1f895c6fe 342 defined (STM32F051x8) || defined (STM32F058xx)
mbed_official 340:28d1f895c6fe 343 #define __HAL_UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 340:28d1f895c6fe 344 do { \
mbed_official 340:28d1f895c6fe 345 if((__HANDLE__)->Instance == USART1) \
mbed_official 340:28d1f895c6fe 346 { \
mbed_official 340:28d1f895c6fe 347 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 340:28d1f895c6fe 348 { \
mbed_official 340:28d1f895c6fe 349 case RCC_USART1CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 350 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 351 break; \
mbed_official 340:28d1f895c6fe 352 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 353 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 354 break; \
mbed_official 340:28d1f895c6fe 355 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 356 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 357 break; \
mbed_official 340:28d1f895c6fe 358 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 359 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 360 break; \
mbed_official 340:28d1f895c6fe 361 default: \
mbed_official 340:28d1f895c6fe 362 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 363 break; \
mbed_official 340:28d1f895c6fe 364 } \
mbed_official 340:28d1f895c6fe 365 } \
mbed_official 340:28d1f895c6fe 366 else if((__HANDLE__)->Instance == USART2) \
mbed_official 340:28d1f895c6fe 367 { \
mbed_official 340:28d1f895c6fe 368 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 369 } \
mbed_official 340:28d1f895c6fe 370 else \
mbed_official 340:28d1f895c6fe 371 { \
mbed_official 340:28d1f895c6fe 372 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 373 } \
mbed_official 340:28d1f895c6fe 374 } while(0)
mbed_official 441:d2c15dda23c1 375 #elif defined(STM32F070xB)
mbed_official 441:d2c15dda23c1 376 #define __HAL_UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 441:d2c15dda23c1 377 do { \
mbed_official 441:d2c15dda23c1 378 if((__HANDLE__)->Instance == USART1) \
mbed_official 441:d2c15dda23c1 379 { \
mbed_official 441:d2c15dda23c1 380 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 441:d2c15dda23c1 381 { \
mbed_official 441:d2c15dda23c1 382 case RCC_USART1CLKSOURCE_PCLK1: \
mbed_official 441:d2c15dda23c1 383 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 384 break; \
mbed_official 441:d2c15dda23c1 385 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 441:d2c15dda23c1 386 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 441:d2c15dda23c1 387 break; \
mbed_official 441:d2c15dda23c1 388 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 441:d2c15dda23c1 389 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 441:d2c15dda23c1 390 break; \
mbed_official 441:d2c15dda23c1 391 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 441:d2c15dda23c1 392 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 441:d2c15dda23c1 393 break; \
mbed_official 441:d2c15dda23c1 394 default: \
mbed_official 441:d2c15dda23c1 395 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 441:d2c15dda23c1 396 break; \
mbed_official 441:d2c15dda23c1 397 } \
mbed_official 441:d2c15dda23c1 398 } \
mbed_official 441:d2c15dda23c1 399 else if((__HANDLE__)->Instance == USART2) \
mbed_official 441:d2c15dda23c1 400 { \
mbed_official 441:d2c15dda23c1 401 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 402 } \
mbed_official 441:d2c15dda23c1 403 else if((__HANDLE__)->Instance == USART3) \
mbed_official 441:d2c15dda23c1 404 { \
mbed_official 441:d2c15dda23c1 405 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 406 } \
mbed_official 441:d2c15dda23c1 407 else if((__HANDLE__)->Instance == USART4) \
mbed_official 441:d2c15dda23c1 408 { \
mbed_official 441:d2c15dda23c1 409 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 410 } \
mbed_official 441:d2c15dda23c1 411 else \
mbed_official 441:d2c15dda23c1 412 { \
mbed_official 441:d2c15dda23c1 413 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 441:d2c15dda23c1 414 } \
mbed_official 441:d2c15dda23c1 415 } while(0)
mbed_official 340:28d1f895c6fe 416 #elif defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
mbed_official 340:28d1f895c6fe 417 #define __HAL_UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 340:28d1f895c6fe 418 do { \
mbed_official 340:28d1f895c6fe 419 if((__HANDLE__)->Instance == USART1) \
mbed_official 340:28d1f895c6fe 420 { \
mbed_official 340:28d1f895c6fe 421 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 340:28d1f895c6fe 422 { \
mbed_official 340:28d1f895c6fe 423 case RCC_USART1CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 424 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 425 break; \
mbed_official 340:28d1f895c6fe 426 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 427 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 428 break; \
mbed_official 340:28d1f895c6fe 429 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 430 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 431 break; \
mbed_official 340:28d1f895c6fe 432 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 433 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 434 break; \
mbed_official 340:28d1f895c6fe 435 default: \
mbed_official 340:28d1f895c6fe 436 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 437 break; \
mbed_official 340:28d1f895c6fe 438 } \
mbed_official 340:28d1f895c6fe 439 } \
mbed_official 340:28d1f895c6fe 440 else if((__HANDLE__)->Instance == USART2) \
mbed_official 340:28d1f895c6fe 441 { \
mbed_official 340:28d1f895c6fe 442 switch(__HAL_RCC_GET_USART2_SOURCE()) \
mbed_official 340:28d1f895c6fe 443 { \
mbed_official 340:28d1f895c6fe 444 case RCC_USART2CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 445 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 446 break; \
mbed_official 340:28d1f895c6fe 447 case RCC_USART2CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 448 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 449 break; \
mbed_official 340:28d1f895c6fe 450 case RCC_USART2CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 451 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 452 break; \
mbed_official 340:28d1f895c6fe 453 case RCC_USART2CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 454 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 455 break; \
mbed_official 340:28d1f895c6fe 456 default: \
mbed_official 340:28d1f895c6fe 457 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 458 break; \
mbed_official 340:28d1f895c6fe 459 } \
mbed_official 340:28d1f895c6fe 460 } \
mbed_official 340:28d1f895c6fe 461 else if((__HANDLE__)->Instance == USART3) \
mbed_official 340:28d1f895c6fe 462 { \
mbed_official 340:28d1f895c6fe 463 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 464 } \
mbed_official 340:28d1f895c6fe 465 else if((__HANDLE__)->Instance == USART4) \
mbed_official 340:28d1f895c6fe 466 { \
mbed_official 340:28d1f895c6fe 467 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 468 } \
mbed_official 340:28d1f895c6fe 469 else \
mbed_official 340:28d1f895c6fe 470 { \
mbed_official 340:28d1f895c6fe 471 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 472 } \
mbed_official 340:28d1f895c6fe 473 } while(0)
mbed_official 340:28d1f895c6fe 474 #elif defined(STM32F091xC) || defined (STM32F098xx)
mbed_official 340:28d1f895c6fe 475 #define __HAL_UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 340:28d1f895c6fe 476 do { \
mbed_official 340:28d1f895c6fe 477 if((__HANDLE__)->Instance == USART1) \
mbed_official 340:28d1f895c6fe 478 { \
mbed_official 340:28d1f895c6fe 479 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 340:28d1f895c6fe 480 { \
mbed_official 340:28d1f895c6fe 481 case RCC_USART1CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 482 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 483 break; \
mbed_official 340:28d1f895c6fe 484 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 485 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 486 break; \
mbed_official 340:28d1f895c6fe 487 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 488 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 489 break; \
mbed_official 340:28d1f895c6fe 490 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 491 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 492 break; \
mbed_official 340:28d1f895c6fe 493 default: \
mbed_official 340:28d1f895c6fe 494 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 495 break; \
mbed_official 340:28d1f895c6fe 496 } \
mbed_official 340:28d1f895c6fe 497 } \
mbed_official 340:28d1f895c6fe 498 else if((__HANDLE__)->Instance == USART2) \
mbed_official 340:28d1f895c6fe 499 { \
mbed_official 340:28d1f895c6fe 500 switch(__HAL_RCC_GET_USART2_SOURCE()) \
mbed_official 340:28d1f895c6fe 501 { \
mbed_official 340:28d1f895c6fe 502 case RCC_USART2CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 503 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 504 break; \
mbed_official 340:28d1f895c6fe 505 case RCC_USART2CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 506 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 507 break; \
mbed_official 340:28d1f895c6fe 508 case RCC_USART2CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 509 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 510 break; \
mbed_official 340:28d1f895c6fe 511 case RCC_USART2CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 512 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 513 break; \
mbed_official 340:28d1f895c6fe 514 default: \
mbed_official 340:28d1f895c6fe 515 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 516 break; \
mbed_official 340:28d1f895c6fe 517 } \
mbed_official 340:28d1f895c6fe 518 } \
mbed_official 340:28d1f895c6fe 519 else if((__HANDLE__)->Instance == USART3) \
mbed_official 340:28d1f895c6fe 520 { \
mbed_official 340:28d1f895c6fe 521 switch(__HAL_RCC_GET_USART3_SOURCE()) \
mbed_official 340:28d1f895c6fe 522 { \
mbed_official 340:28d1f895c6fe 523 case RCC_USART3CLKSOURCE_PCLK1: \
mbed_official 340:28d1f895c6fe 524 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 525 break; \
mbed_official 340:28d1f895c6fe 526 case RCC_USART3CLKSOURCE_HSI: \
mbed_official 340:28d1f895c6fe 527 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 340:28d1f895c6fe 528 break; \
mbed_official 340:28d1f895c6fe 529 case RCC_USART3CLKSOURCE_SYSCLK: \
mbed_official 340:28d1f895c6fe 530 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 340:28d1f895c6fe 531 break; \
mbed_official 340:28d1f895c6fe 532 case RCC_USART3CLKSOURCE_LSE: \
mbed_official 340:28d1f895c6fe 533 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 340:28d1f895c6fe 534 break; \
mbed_official 340:28d1f895c6fe 535 default: \
mbed_official 340:28d1f895c6fe 536 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 537 break; \
mbed_official 340:28d1f895c6fe 538 } \
mbed_official 340:28d1f895c6fe 539 } \
mbed_official 340:28d1f895c6fe 540 else if((__HANDLE__)->Instance == USART4) \
mbed_official 340:28d1f895c6fe 541 { \
mbed_official 340:28d1f895c6fe 542 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 543 } \
mbed_official 340:28d1f895c6fe 544 else if((__HANDLE__)->Instance == USART5) \
mbed_official 340:28d1f895c6fe 545 { \
mbed_official 340:28d1f895c6fe 546 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 547 } \
mbed_official 340:28d1f895c6fe 548 else if((__HANDLE__)->Instance == USART6) \
mbed_official 340:28d1f895c6fe 549 { \
mbed_official 340:28d1f895c6fe 550 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 551 } \
mbed_official 340:28d1f895c6fe 552 else if((__HANDLE__)->Instance == USART7) \
mbed_official 340:28d1f895c6fe 553 { \
mbed_official 340:28d1f895c6fe 554 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 555 } \
mbed_official 340:28d1f895c6fe 556 else if((__HANDLE__)->Instance == USART8) \
mbed_official 340:28d1f895c6fe 557 { \
mbed_official 340:28d1f895c6fe 558 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 340:28d1f895c6fe 559 } \
mbed_official 340:28d1f895c6fe 560 else \
mbed_official 340:28d1f895c6fe 561 { \
mbed_official 340:28d1f895c6fe 562 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 340:28d1f895c6fe 563 } \
mbed_official 340:28d1f895c6fe 564 } while(0)
mbed_official 441:d2c15dda23c1 565 #elif defined(STM32F030xC)
mbed_official 441:d2c15dda23c1 566 #define __HAL_UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 441:d2c15dda23c1 567 do { \
mbed_official 441:d2c15dda23c1 568 if((__HANDLE__)->Instance == USART1) \
mbed_official 441:d2c15dda23c1 569 { \
mbed_official 441:d2c15dda23c1 570 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 441:d2c15dda23c1 571 { \
mbed_official 441:d2c15dda23c1 572 case RCC_USART1CLKSOURCE_PCLK1: \
mbed_official 441:d2c15dda23c1 573 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 574 break; \
mbed_official 441:d2c15dda23c1 575 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 441:d2c15dda23c1 576 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI; \
mbed_official 441:d2c15dda23c1 577 break; \
mbed_official 441:d2c15dda23c1 578 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 441:d2c15dda23c1 579 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK; \
mbed_official 441:d2c15dda23c1 580 break; \
mbed_official 441:d2c15dda23c1 581 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 441:d2c15dda23c1 582 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE; \
mbed_official 441:d2c15dda23c1 583 break; \
mbed_official 441:d2c15dda23c1 584 default: \
mbed_official 441:d2c15dda23c1 585 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 441:d2c15dda23c1 586 break; \
mbed_official 441:d2c15dda23c1 587 } \
mbed_official 441:d2c15dda23c1 588 } \
mbed_official 441:d2c15dda23c1 589 else if((__HANDLE__)->Instance == USART2) \
mbed_official 441:d2c15dda23c1 590 { \
mbed_official 441:d2c15dda23c1 591 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 592 } \
mbed_official 441:d2c15dda23c1 593 else if((__HANDLE__)->Instance == USART3) \
mbed_official 441:d2c15dda23c1 594 { \
mbed_official 441:d2c15dda23c1 595 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 596 } \
mbed_official 441:d2c15dda23c1 597 else if((__HANDLE__)->Instance == USART4) \
mbed_official 441:d2c15dda23c1 598 { \
mbed_official 441:d2c15dda23c1 599 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 600 } \
mbed_official 441:d2c15dda23c1 601 else if((__HANDLE__)->Instance == USART5) \
mbed_official 441:d2c15dda23c1 602 { \
mbed_official 441:d2c15dda23c1 603 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 604 } \
mbed_official 441:d2c15dda23c1 605 else if((__HANDLE__)->Instance == USART6) \
mbed_official 441:d2c15dda23c1 606 { \
mbed_official 441:d2c15dda23c1 607 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1; \
mbed_official 441:d2c15dda23c1 608 } \
mbed_official 441:d2c15dda23c1 609 else \
mbed_official 441:d2c15dda23c1 610 { \
mbed_official 441:d2c15dda23c1 611 (__CLOCKSOURCE__) = UART_CLOCKSOURCE_UNDEFINED; \
mbed_official 441:d2c15dda23c1 612 } \
mbed_official 441:d2c15dda23c1 613 } while(0)
mbed_official 340:28d1f895c6fe 614
mbed_official 340:28d1f895c6fe 615 #endif /* defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx) */
mbed_official 340:28d1f895c6fe 616
mbed_official 340:28d1f895c6fe 617
mbed_official 340:28d1f895c6fe 618 /** @brief Computes the UART mask to apply to retrieve the received data
mbed_official 340:28d1f895c6fe 619 * according to the word length and to the parity bits activation.
mbed_official 340:28d1f895c6fe 620 * If PCE = 1, the parity bit is not included in the data extracted
mbed_official 340:28d1f895c6fe 621 * by the reception API().
mbed_official 340:28d1f895c6fe 622 * This masking operation is not carried out in the case of
mbed_official 340:28d1f895c6fe 623 * DMA transfers.
mbed_official 340:28d1f895c6fe 624 * @param __HANDLE__: specifies the UART Handle
mbed_official 340:28d1f895c6fe 625 * @retval none
mbed_official 340:28d1f895c6fe 626 */
mbed_official 441:d2c15dda23c1 627 #if defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6) || \
mbed_official 441:d2c15dda23c1 628 defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || defined (STM32F070xB) || \
mbed_official 441:d2c15dda23c1 629 defined (STM32F091xC) || defined (STM32F098xx) || defined (STM32F030xC)
mbed_official 340:28d1f895c6fe 630 #define __HAL_UART_MASK_COMPUTATION(__HANDLE__) \
mbed_official 340:28d1f895c6fe 631 do { \
mbed_official 340:28d1f895c6fe 632 if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_9B) \
mbed_official 340:28d1f895c6fe 633 { \
mbed_official 340:28d1f895c6fe 634 if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE) \
mbed_official 340:28d1f895c6fe 635 { \
mbed_official 340:28d1f895c6fe 636 (__HANDLE__)->Mask = 0x01FF ; \
mbed_official 340:28d1f895c6fe 637 } \
mbed_official 340:28d1f895c6fe 638 else \
mbed_official 340:28d1f895c6fe 639 { \
mbed_official 340:28d1f895c6fe 640 (__HANDLE__)->Mask = 0x00FF ; \
mbed_official 340:28d1f895c6fe 641 } \
mbed_official 340:28d1f895c6fe 642 } \
mbed_official 340:28d1f895c6fe 643 else if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_8B) \
mbed_official 340:28d1f895c6fe 644 { \
mbed_official 340:28d1f895c6fe 645 if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE) \
mbed_official 340:28d1f895c6fe 646 { \
mbed_official 340:28d1f895c6fe 647 (__HANDLE__)->Mask = 0x00FF ; \
mbed_official 340:28d1f895c6fe 648 } \
mbed_official 340:28d1f895c6fe 649 else \
mbed_official 340:28d1f895c6fe 650 { \
mbed_official 340:28d1f895c6fe 651 (__HANDLE__)->Mask = 0x007F ; \
mbed_official 340:28d1f895c6fe 652 } \
mbed_official 340:28d1f895c6fe 653 } \
mbed_official 340:28d1f895c6fe 654 else if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_7B) \
mbed_official 340:28d1f895c6fe 655 { \
mbed_official 340:28d1f895c6fe 656 if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE) \
mbed_official 340:28d1f895c6fe 657 { \
mbed_official 340:28d1f895c6fe 658 (__HANDLE__)->Mask = 0x007F ; \
mbed_official 340:28d1f895c6fe 659 } \
mbed_official 340:28d1f895c6fe 660 else \
mbed_official 340:28d1f895c6fe 661 { \
mbed_official 340:28d1f895c6fe 662 (__HANDLE__)->Mask = 0x003F ; \
mbed_official 340:28d1f895c6fe 663 } \
mbed_official 340:28d1f895c6fe 664 } \
mbed_official 340:28d1f895c6fe 665 } while(0)
mbed_official 340:28d1f895c6fe 666 #else
mbed_official 340:28d1f895c6fe 667 #define __HAL_UART_MASK_COMPUTATION(__HANDLE__) \
mbed_official 340:28d1f895c6fe 668 do { \
mbed_official 340:28d1f895c6fe 669 if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_9B) \
mbed_official 340:28d1f895c6fe 670 { \
mbed_official 340:28d1f895c6fe 671 if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE) \
mbed_official 340:28d1f895c6fe 672 { \
mbed_official 340:28d1f895c6fe 673 (__HANDLE__)->Mask = 0x01FF ; \
mbed_official 340:28d1f895c6fe 674 } \
mbed_official 340:28d1f895c6fe 675 else \
mbed_official 340:28d1f895c6fe 676 { \
mbed_official 340:28d1f895c6fe 677 (__HANDLE__)->Mask = 0x00FF ; \
mbed_official 340:28d1f895c6fe 678 } \
mbed_official 340:28d1f895c6fe 679 } \
mbed_official 340:28d1f895c6fe 680 else if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_8B) \
mbed_official 340:28d1f895c6fe 681 { \
mbed_official 340:28d1f895c6fe 682 if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE) \
mbed_official 340:28d1f895c6fe 683 { \
mbed_official 340:28d1f895c6fe 684 (__HANDLE__)->Mask = 0x00FF ; \
mbed_official 340:28d1f895c6fe 685 } \
mbed_official 340:28d1f895c6fe 686 else \
mbed_official 340:28d1f895c6fe 687 { \
mbed_official 340:28d1f895c6fe 688 (__HANDLE__)->Mask = 0x007F ; \
mbed_official 340:28d1f895c6fe 689 } \
mbed_official 340:28d1f895c6fe 690 } \
mbed_official 340:28d1f895c6fe 691 } while(0)
mbed_official 441:d2c15dda23c1 692 #endif /* defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6) || \
mbed_official 441:d2c15dda23c1 693 defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || defined (STM32F070xB) || \
mbed_official 441:d2c15dda23c1 694 defined (STM32F091xC) || defined (STM32F098xx) || defined (STM32F030xC) */
mbed_official 340:28d1f895c6fe 695 /**
mbed_official 340:28d1f895c6fe 696 * @}
mbed_official 340:28d1f895c6fe 697 */
mbed_official 340:28d1f895c6fe 698
mbed_official 340:28d1f895c6fe 699 /* Exported functions --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 700 /** @addtogroup UARTEx_Exported_Functions
mbed_official 340:28d1f895c6fe 701 * @{
mbed_official 340:28d1f895c6fe 702 */
mbed_official 340:28d1f895c6fe 703
mbed_official 340:28d1f895c6fe 704 /** @addtogroup UARTEx_Exported_Functions_Group1
mbed_official 340:28d1f895c6fe 705 * @brief Extended Initialization and Configuration Functions
mbed_official 340:28d1f895c6fe 706 * @{
mbed_official 340:28d1f895c6fe 707 */
mbed_official 340:28d1f895c6fe 708 /* Initialization and de-initialization functions ****************************/
mbed_official 441:d2c15dda23c1 709 #if !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070xB)&& !defined(STM32F070x6)&& !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 710 HAL_StatusTypeDef HAL_RS485Ex_Init(UART_HandleTypeDef *huart, uint32_t UART_DEPolarity, uint32_t UART_DEAssertionTime, uint32_t UART_DEDeassertionTime);
mbed_official 340:28d1f895c6fe 711 HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength);
mbed_official 441:d2c15dda23c1 712 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070xB)&& !defined(STM32F070x6)&& !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 713 /**
mbed_official 340:28d1f895c6fe 714 * @}
mbed_official 340:28d1f895c6fe 715 */
mbed_official 340:28d1f895c6fe 716
mbed_official 340:28d1f895c6fe 717 /** @addtogroup UARTEx_Exported_Functions_Group2
mbed_official 441:d2c15dda23c1 718 * @brief Extended UART Interrupt handling function
mbed_official 340:28d1f895c6fe 719 * @{
mbed_official 340:28d1f895c6fe 720 */
mbed_official 340:28d1f895c6fe 721
mbed_official 441:d2c15dda23c1 722 /* IO operation functions ***************************************************/
mbed_official 340:28d1f895c6fe 723 void HAL_UART_IRQHandler(UART_HandleTypeDef *huart);
mbed_official 441:d2c15dda23c1 724
mbed_official 441:d2c15dda23c1 725 #if !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070xB)&& !defined(STM32F070x6)&& !defined(STM32F030xC)
mbed_official 340:28d1f895c6fe 726 void HAL_UART_WakeupCallback(UART_HandleTypeDef *huart);
mbed_official 441:d2c15dda23c1 727 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070xB)&& !defined(STM32F070x6)&& !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 728 /**
mbed_official 340:28d1f895c6fe 729 * @}
mbed_official 340:28d1f895c6fe 730 */
mbed_official 340:28d1f895c6fe 731
mbed_official 340:28d1f895c6fe 732 /** @addtogroup UARTEx_Exported_Functions_Group3
mbed_official 340:28d1f895c6fe 733 * @brief Extended Peripheral Control functions
mbed_official 340:28d1f895c6fe 734 * @{
mbed_official 340:28d1f895c6fe 735 */
mbed_official 340:28d1f895c6fe 736
mbed_official 340:28d1f895c6fe 737 /* Peripheral Control functions **********************************************/
mbed_official 340:28d1f895c6fe 738 HAL_StatusTypeDef HAL_MultiProcessorEx_AddressLength_Set(UART_HandleTypeDef *huart, uint32_t AddressLength);
mbed_official 441:d2c15dda23c1 739 #if !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070xB)&& !defined(STM32F070x6) && !defined(STM32F030xC)
mbed_official 441:d2c15dda23c1 740 HAL_StatusTypeDef HAL_UARTEx_StopModeWakeUpSourceConfig(UART_HandleTypeDef *huart, UART_WakeUpTypeDef WakeUpSelection);
mbed_official 441:d2c15dda23c1 741 HAL_StatusTypeDef HAL_UARTEx_EnableStopMode(UART_HandleTypeDef *huart);
mbed_official 441:d2c15dda23c1 742 HAL_StatusTypeDef HAL_UARTEx_DisableStopMode(UART_HandleTypeDef *huart);
mbed_official 340:28d1f895c6fe 743 HAL_StatusTypeDef HAL_LIN_SendBreak(UART_HandleTypeDef *huart);
mbed_official 441:d2c15dda23c1 744 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070xB)&& !defined(STM32F070x6)&& !defined(STM32F030xC) */
mbed_official 340:28d1f895c6fe 745 /**
mbed_official 340:28d1f895c6fe 746 * @}
mbed_official 340:28d1f895c6fe 747 */
mbed_official 340:28d1f895c6fe 748 /* Peripheral State functions ************************************************/
mbed_official 340:28d1f895c6fe 749
mbed_official 340:28d1f895c6fe 750 /**
mbed_official 340:28d1f895c6fe 751 * @}
mbed_official 340:28d1f895c6fe 752 */
mbed_official 340:28d1f895c6fe 753
mbed_official 340:28d1f895c6fe 754
mbed_official 340:28d1f895c6fe 755 /**
mbed_official 340:28d1f895c6fe 756 * @}
mbed_official 340:28d1f895c6fe 757 */
mbed_official 340:28d1f895c6fe 758
mbed_official 340:28d1f895c6fe 759 /**
mbed_official 340:28d1f895c6fe 760 * @}
mbed_official 340:28d1f895c6fe 761 */
mbed_official 340:28d1f895c6fe 762
mbed_official 340:28d1f895c6fe 763 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 764 }
mbed_official 340:28d1f895c6fe 765 #endif
mbed_official 340:28d1f895c6fe 766
mbed_official 340:28d1f895c6fe 767 #endif /* __STM32F0xx_HAL_UART_EX_H */
mbed_official 340:28d1f895c6fe 768
mbed_official 340:28d1f895c6fe 769 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
mbed_official 340:28d1f895c6fe 770