The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
135:176b8275d35d
Child:
139:856d2700e60b
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /**
Kojto 122:f9eeca106725 2 ******************************************************************************
Kojto 122:f9eeca106725 3 * @file stm32f7xx_hal_smartcard_ex.h
Kojto 122:f9eeca106725 4 * @author MCD Application Team
<> 135:176b8275d35d 5 * @version V1.1.2
<> 135:176b8275d35d 6 * @date 23-September-2016
Kojto 122:f9eeca106725 7 * @brief Header file of SMARTCARD HAL module.
Kojto 122:f9eeca106725 8 ******************************************************************************
Kojto 122:f9eeca106725 9 * @attention
Kojto 122:f9eeca106725 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 122:f9eeca106725 12 *
Kojto 122:f9eeca106725 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 122:f9eeca106725 14 * are permitted provided that the following conditions are met:
Kojto 122:f9eeca106725 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 122:f9eeca106725 16 * this list of conditions and the following disclaimer.
Kojto 122:f9eeca106725 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 122:f9eeca106725 18 * this list of conditions and the following disclaimer in the documentation
Kojto 122:f9eeca106725 19 * and/or other materials provided with the distribution.
Kojto 122:f9eeca106725 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 122:f9eeca106725 21 * may be used to endorse or promote products derived from this software
Kojto 122:f9eeca106725 22 * without specific prior written permission.
Kojto 122:f9eeca106725 23 *
Kojto 122:f9eeca106725 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 122:f9eeca106725 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 122:f9eeca106725 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 122:f9eeca106725 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 122:f9eeca106725 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 122:f9eeca106725 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 122:f9eeca106725 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 122:f9eeca106725 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 122:f9eeca106725 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 122:f9eeca106725 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 122:f9eeca106725 34 *
Kojto 122:f9eeca106725 35 ******************************************************************************
Kojto 122:f9eeca106725 36 */
Kojto 122:f9eeca106725 37
Kojto 122:f9eeca106725 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 122:f9eeca106725 39 #ifndef __STM32F7xx_HAL_SMARTCARD_EX_H
Kojto 122:f9eeca106725 40 #define __STM32F7xx_HAL_SMARTCARD_EX_H
Kojto 122:f9eeca106725 41
Kojto 122:f9eeca106725 42 #ifdef __cplusplus
Kojto 122:f9eeca106725 43 extern "C" {
Kojto 122:f9eeca106725 44 #endif
Kojto 122:f9eeca106725 45
Kojto 122:f9eeca106725 46 /* Includes ------------------------------------------------------------------*/
Kojto 122:f9eeca106725 47 #include "stm32f7xx_hal_def.h"
Kojto 122:f9eeca106725 48
Kojto 122:f9eeca106725 49 /** @addtogroup STM32F7xx_HAL_Driver
Kojto 122:f9eeca106725 50 * @{
Kojto 122:f9eeca106725 51 */
Kojto 122:f9eeca106725 52
Kojto 122:f9eeca106725 53 /** @addtogroup SMARTCARDEx
Kojto 122:f9eeca106725 54 * @{
Kojto 122:f9eeca106725 55 */
Kojto 122:f9eeca106725 56
Kojto 122:f9eeca106725 57 /* Exported types ------------------------------------------------------------*/
Kojto 122:f9eeca106725 58 /* Exported constants --------------------------------------------------------*/
<> 135:176b8275d35d 59
<> 135:176b8275d35d 60 /** @addtogroup SMARTCARDEx_Exported_Constants SMARTCARD Extended Exported Constants
<> 135:176b8275d35d 61 * @{
<> 135:176b8275d35d 62 */
<> 135:176b8275d35d 63
<> 135:176b8275d35d 64 /** @defgroup SMARTCARDEx_Transmission_Completion_Indication SMARTCARD Transmission Completion Indication
<> 135:176b8275d35d 65 * @{
<> 135:176b8275d35d 66 */
<> 135:176b8275d35d 67 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 68 #define SMARTCARD_TCBGT SMARTCARD_IT_TCBGT /*!< SMARTCARD transmission complete before guard time */
<> 135:176b8275d35d 69 #endif /* USART_TCBGT_SUPPORT */
<> 135:176b8275d35d 70 #define SMARTCARD_TC SMARTCARD_IT_TC /*!< SMARTCARD transmission complete (flag raised when guard time has elapsed) */
<> 135:176b8275d35d 71 /**
<> 135:176b8275d35d 72 * @}
<> 135:176b8275d35d 73 */
<> 135:176b8275d35d 74
<> 135:176b8275d35d 75 /** @defgroup SMARTCARDEx_Advanced_Features_Initialization_Type SMARTCARD advanced feature initialization type
<> 135:176b8275d35d 76 * @{
<> 135:176b8275d35d 77 */
<> 135:176b8275d35d 78 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 79 #define SMARTCARD_ADVFEATURE_TXCOMPLETION ((uint32_t)0x00000100) /*!< TX completion indication before of after guard time */
<> 135:176b8275d35d 80 #endif /* USART_TCBGT_SUPPORT */
<> 135:176b8275d35d 81 /**
<> 135:176b8275d35d 82 * @}
<> 135:176b8275d35d 83 */
<> 135:176b8275d35d 84
<> 135:176b8275d35d 85
<> 135:176b8275d35d 86
<> 135:176b8275d35d 87
<> 135:176b8275d35d 88 /** @defgroup SMARTCARDEx_Flags SMARTCARD Flags
<> 135:176b8275d35d 89 * Elements values convention: 0xXXXX
<> 135:176b8275d35d 90 * - 0xXXXX : Flag mask in the ISR register
<> 135:176b8275d35d 91 * @{
<> 135:176b8275d35d 92 */
<> 135:176b8275d35d 93 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 94 #define SMARTCARD_FLAG_TCBGT USART_ISR_TCBGT /*!< SMARTCARD transmission complete before guard time completion */
<> 135:176b8275d35d 95 #endif /* USART_TCBGT_SUPPORT */
<> 135:176b8275d35d 96 /**
<> 135:176b8275d35d 97 * @}
<> 135:176b8275d35d 98 */
<> 135:176b8275d35d 99
<> 135:176b8275d35d 100 /** @defgroup SMARTCARDEx_Interrupt_definition SMARTCARD Interrupts Definition
<> 135:176b8275d35d 101 * Elements values convention: 000ZZZZZ0XXYYYYYb
<> 135:176b8275d35d 102 * - YYYYY : Interrupt source position in the XX register (5 bits)
<> 135:176b8275d35d 103 * - XX : Interrupt source register (2 bits)
<> 135:176b8275d35d 104 * - 01: CR1 register
<> 135:176b8275d35d 105 * - 10: CR2 register
<> 135:176b8275d35d 106 * - 11: CR3 register
<> 135:176b8275d35d 107 * - ZZZZZ : Flag position in the ISR register(5 bits)
<> 135:176b8275d35d 108 * @{
<> 135:176b8275d35d 109 */
<> 135:176b8275d35d 110
<> 135:176b8275d35d 111 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 112 #define SMARTCARD_IT_TCBGT ((uint16_t)0x1978) /*!< SMARTCARD transmission complete before guard time completion interruption */
<> 135:176b8275d35d 113 #endif /* USART_TCBGT_SUPPORT */
<> 135:176b8275d35d 114 /**
<> 135:176b8275d35d 115 * @}
<> 135:176b8275d35d 116 */
<> 135:176b8275d35d 117
<> 135:176b8275d35d 118 /** @defgroup SMARTCARDEx_IT_CLEAR_Flags SMARTCARD Interruption Clear Flags
<> 135:176b8275d35d 119 * @{
<> 135:176b8275d35d 120 */
<> 135:176b8275d35d 121 #define SMARTCARD_CLEAR_PEF USART_ICR_PECF /*!< SMARTCARD parity error clear flag */
<> 135:176b8275d35d 122 #define SMARTCARD_CLEAR_FEF USART_ICR_FECF /*!< SMARTCARD framing error clear flag */
<> 135:176b8275d35d 123 #define SMARTCARD_CLEAR_NEF USART_ICR_NCF /*!< SMARTCARD noise detected clear flag */
<> 135:176b8275d35d 124 #define SMARTCARD_CLEAR_OREF USART_ICR_ORECF /*!< SMARTCARD overrun error clear flag */
<> 135:176b8275d35d 125 #define SMARTCARD_CLEAR_IDLEF USART_ICR_IDLECF /*!< SMARTCARD idle line detected clear flag */
<> 135:176b8275d35d 126 #define SMARTCARD_CLEAR_TCF USART_ICR_TCCF /*!< SMARTCARD transmission complete clear flag */
<> 135:176b8275d35d 127 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 128 #define SMARTCARD_CLEAR_TCBGTF USART_ICR_TCBGTCF /*!< SMARTCARD transmission complete before guard time completion clear flag */
<> 135:176b8275d35d 129 #endif /* USART_TCBGT_SUPPORT */
<> 135:176b8275d35d 130 #define SMARTCARD_CLEAR_RTOF USART_ICR_RTOCF /*!< SMARTCARD receiver time out clear flag */
<> 135:176b8275d35d 131 #define SMARTCARD_CLEAR_EOBF USART_ICR_EOBCF /*!< SMARTCARD end of block clear flag */
<> 135:176b8275d35d 132 /**
<> 135:176b8275d35d 133 * @}
<> 135:176b8275d35d 134 */
<> 135:176b8275d35d 135
Kojto 122:f9eeca106725 136 /* Exported macro ------------------------------------------------------------*/
Kojto 122:f9eeca106725 137
Kojto 122:f9eeca106725 138 /** @brief Reports the SMARTCARD clock source.
Kojto 122:f9eeca106725 139 * @param __HANDLE__: specifies the USART Handle
Kojto 122:f9eeca106725 140 * @param __CLOCKSOURCE__ : output variable
Kojto 122:f9eeca106725 141 * @retval the USART clocking source, written in __CLOCKSOURCE__.
Kojto 122:f9eeca106725 142 */
Kojto 122:f9eeca106725 143 #define SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
Kojto 122:f9eeca106725 144 do { \
Kojto 122:f9eeca106725 145 if((__HANDLE__)->Instance == USART1) \
Kojto 122:f9eeca106725 146 { \
Kojto 122:f9eeca106725 147 switch(__HAL_RCC_GET_USART1_SOURCE()) \
Kojto 122:f9eeca106725 148 { \
Kojto 122:f9eeca106725 149 case RCC_USART1CLKSOURCE_PCLK2: \
Kojto 122:f9eeca106725 150 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \
Kojto 122:f9eeca106725 151 break; \
Kojto 122:f9eeca106725 152 case RCC_USART1CLKSOURCE_HSI: \
Kojto 122:f9eeca106725 153 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 122:f9eeca106725 154 break; \
Kojto 122:f9eeca106725 155 case RCC_USART1CLKSOURCE_SYSCLK: \
Kojto 122:f9eeca106725 156 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 122:f9eeca106725 157 break; \
Kojto 122:f9eeca106725 158 case RCC_USART1CLKSOURCE_LSE: \
Kojto 122:f9eeca106725 159 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 122:f9eeca106725 160 break; \
Kojto 122:f9eeca106725 161 default: \
Kojto 122:f9eeca106725 162 break; \
Kojto 122:f9eeca106725 163 } \
Kojto 122:f9eeca106725 164 } \
Kojto 122:f9eeca106725 165 else if((__HANDLE__)->Instance == USART2) \
Kojto 122:f9eeca106725 166 { \
Kojto 122:f9eeca106725 167 switch(__HAL_RCC_GET_USART2_SOURCE()) \
Kojto 122:f9eeca106725 168 { \
Kojto 122:f9eeca106725 169 case RCC_USART2CLKSOURCE_PCLK1: \
Kojto 122:f9eeca106725 170 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 122:f9eeca106725 171 break; \
Kojto 122:f9eeca106725 172 case RCC_USART2CLKSOURCE_HSI: \
Kojto 122:f9eeca106725 173 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 122:f9eeca106725 174 break; \
Kojto 122:f9eeca106725 175 case RCC_USART2CLKSOURCE_SYSCLK: \
Kojto 122:f9eeca106725 176 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 122:f9eeca106725 177 break; \
Kojto 122:f9eeca106725 178 case RCC_USART2CLKSOURCE_LSE: \
Kojto 122:f9eeca106725 179 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 122:f9eeca106725 180 break; \
Kojto 122:f9eeca106725 181 default: \
Kojto 122:f9eeca106725 182 break; \
Kojto 122:f9eeca106725 183 } \
Kojto 122:f9eeca106725 184 } \
Kojto 122:f9eeca106725 185 else if((__HANDLE__)->Instance == USART3) \
Kojto 122:f9eeca106725 186 { \
Kojto 122:f9eeca106725 187 switch(__HAL_RCC_GET_USART3_SOURCE()) \
Kojto 122:f9eeca106725 188 { \
Kojto 122:f9eeca106725 189 case RCC_USART3CLKSOURCE_PCLK1: \
Kojto 122:f9eeca106725 190 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 122:f9eeca106725 191 break; \
Kojto 122:f9eeca106725 192 case RCC_USART3CLKSOURCE_HSI: \
Kojto 122:f9eeca106725 193 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 122:f9eeca106725 194 break; \
Kojto 122:f9eeca106725 195 case RCC_USART3CLKSOURCE_SYSCLK: \
Kojto 122:f9eeca106725 196 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 122:f9eeca106725 197 break; \
Kojto 122:f9eeca106725 198 case RCC_USART3CLKSOURCE_LSE: \
Kojto 122:f9eeca106725 199 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 122:f9eeca106725 200 break; \
Kojto 122:f9eeca106725 201 default: \
Kojto 122:f9eeca106725 202 break; \
Kojto 122:f9eeca106725 203 } \
Kojto 122:f9eeca106725 204 } \
Kojto 122:f9eeca106725 205 else if((__HANDLE__)->Instance == USART6) \
Kojto 122:f9eeca106725 206 { \
Kojto 122:f9eeca106725 207 switch(__HAL_RCC_GET_USART6_SOURCE()) \
Kojto 122:f9eeca106725 208 { \
Kojto 122:f9eeca106725 209 case RCC_USART6CLKSOURCE_PCLK2: \
Kojto 122:f9eeca106725 210 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \
Kojto 122:f9eeca106725 211 break; \
Kojto 122:f9eeca106725 212 case RCC_USART6CLKSOURCE_HSI: \
Kojto 122:f9eeca106725 213 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 122:f9eeca106725 214 break; \
Kojto 122:f9eeca106725 215 case RCC_USART6CLKSOURCE_SYSCLK: \
Kojto 122:f9eeca106725 216 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 122:f9eeca106725 217 break; \
Kojto 122:f9eeca106725 218 case RCC_USART6CLKSOURCE_LSE: \
Kojto 122:f9eeca106725 219 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 122:f9eeca106725 220 break; \
Kojto 122:f9eeca106725 221 default: \
Kojto 122:f9eeca106725 222 break; \
Kojto 122:f9eeca106725 223 } \
Kojto 122:f9eeca106725 224 } \
Kojto 122:f9eeca106725 225 } while(0)
Kojto 122:f9eeca106725 226
<> 135:176b8275d35d 227 /** @brief Set the Transmission Completion flag
<> 135:176b8275d35d 228 * @param __HANDLE__: specifies the SMARTCARD Handle.
<> 135:176b8275d35d 229 * @note If TCBGT (Transmission Complete Before Guard Time) flag is not available or if
<> 135:176b8275d35d 230 * AdvancedInit.TxCompletionIndication is not already filled, the latter is forced
<> 135:176b8275d35d 231 * to SMARTCARD_TC (transmission completion indication when guard time has elapsed).
<> 135:176b8275d35d 232 * @retval None
<> 135:176b8275d35d 233 */
<> 135:176b8275d35d 234 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 235 #define SMARTCARD_TRANSMISSION_COMPLETION_SETTING(__HANDLE__) \
<> 135:176b8275d35d 236 do { \
<> 135:176b8275d35d 237 if (HAL_IS_BIT_CLR((__HANDLE__)->AdvancedInit.AdvFeatureInit, SMARTCARD_ADVFEATURE_TXCOMPLETION)) \
<> 135:176b8275d35d 238 { \
<> 135:176b8275d35d 239 (__HANDLE__)->AdvancedInit.TxCompletionIndication = SMARTCARD_TC; \
<> 135:176b8275d35d 240 } \
<> 135:176b8275d35d 241 else \
<> 135:176b8275d35d 242 { \
<> 135:176b8275d35d 243 assert_param(IS_SMARTCARD_TRANSMISSION_COMPLETION((__HANDLE__)->AdvancedInit.TxCompletionIndication)); \
<> 135:176b8275d35d 244 } \
<> 135:176b8275d35d 245 } while(0)
<> 135:176b8275d35d 246 #else
<> 135:176b8275d35d 247 #define SMARTCARD_TRANSMISSION_COMPLETION_SETTING(__HANDLE__) \
<> 135:176b8275d35d 248 do { \
<> 135:176b8275d35d 249 (__HANDLE__)->AdvancedInit.TxCompletionIndication = SMARTCARD_TC; \
<> 135:176b8275d35d 250 } while(0)
<> 135:176b8275d35d 251 #endif
<> 135:176b8275d35d 252
<> 135:176b8275d35d 253 /** @brief Return the transmission completion flag.
<> 135:176b8275d35d 254 * @param __HANDLE__: specifies the SMARTCARD Handle.
<> 135:176b8275d35d 255 * @note Based on AdvancedInit.TxCompletionIndication setting, return TC or TCBGT flag.
<> 135:176b8275d35d 256 * When TCBGT flag (Transmission Complete Before Guard Time) is not available, TC flag is
<> 135:176b8275d35d 257 * reported.
<> 135:176b8275d35d 258 * @retval Transmission completion flag
<> 135:176b8275d35d 259 */
<> 135:176b8275d35d 260 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 261 #define SMARTCARD_TRANSMISSION_COMPLETION_FLAG(__HANDLE__) \
<> 135:176b8275d35d 262 (((__HANDLE__)->AdvancedInit.TxCompletionIndication == SMARTCARD_TC) ? (SMARTCARD_FLAG_TC) : (SMARTCARD_FLAG_TCBGT))
<> 135:176b8275d35d 263 #else
<> 135:176b8275d35d 264 #define SMARTCARD_TRANSMISSION_COMPLETION_FLAG(__HANDLE__) (SMARTCARD_FLAG_TC)
<> 135:176b8275d35d 265 #endif
<> 135:176b8275d35d 266
<> 135:176b8275d35d 267 /**
<> 135:176b8275d35d 268 * @brief Ensure that SMARTCARD frame transmission completion used flag is valid.
<> 135:176b8275d35d 269 * @param __TXCOMPLETE__: SMARTCARD frame transmission completion used flag.
<> 135:176b8275d35d 270 * @retval SET (__TXCOMPLETE__ is valid) or RESET (__TXCOMPLETE__ is invalid)
<> 135:176b8275d35d 271 */
<> 135:176b8275d35d 272 #if defined(USART_TCBGT_SUPPORT)
<> 135:176b8275d35d 273 #define IS_SMARTCARD_TRANSMISSION_COMPLETION(__TXCOMPLETE__) (((__TXCOMPLETE__) == SMARTCARD_TCBGT) ||\
<> 135:176b8275d35d 274 ((__TXCOMPLETE__) == SMARTCARD_TC))
<> 135:176b8275d35d 275 #else
<> 135:176b8275d35d 276 #define IS_SMARTCARD_TRANSMISSION_COMPLETION(__TXCOMPLETE__) ((__TXCOMPLETE__) == SMARTCARD_TC)
<> 135:176b8275d35d 277 #endif
<> 135:176b8275d35d 278
<> 135:176b8275d35d 279 /**
<> 135:176b8275d35d 280 * @}
<> 135:176b8275d35d 281 */
<> 135:176b8275d35d 282
Kojto 122:f9eeca106725 283 /* Exported functions --------------------------------------------------------*/
Kojto 122:f9eeca106725 284 /* Initialization and de-initialization functions ****************************/
Kojto 122:f9eeca106725 285 /* IO operation functions *****************************************************/
Kojto 122:f9eeca106725 286 /* Peripheral Control functions ***********************************************/
Kojto 122:f9eeca106725 287 void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsc, uint8_t BlockLength);
Kojto 122:f9eeca106725 288 void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsc, uint32_t TimeOutValue);
Kojto 122:f9eeca106725 289 HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc);
Kojto 122:f9eeca106725 290 HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc);
Kojto 122:f9eeca106725 291
Kojto 122:f9eeca106725 292 /* Peripheral State and Error functions ***************************************/
Kojto 122:f9eeca106725 293
Kojto 122:f9eeca106725 294 /**
Kojto 122:f9eeca106725 295 * @}
Kojto 122:f9eeca106725 296 */
Kojto 122:f9eeca106725 297
Kojto 122:f9eeca106725 298 /**
Kojto 122:f9eeca106725 299 * @}
Kojto 122:f9eeca106725 300 */
Kojto 122:f9eeca106725 301
Kojto 122:f9eeca106725 302 #ifdef __cplusplus
Kojto 122:f9eeca106725 303 }
Kojto 122:f9eeca106725 304 #endif
Kojto 122:f9eeca106725 305
Kojto 122:f9eeca106725 306 #endif /* __STM32F7xx_HAL_SMARTCARD_EX_H */
Kojto 122:f9eeca106725 307
Kojto 122:f9eeca106725 308 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/