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

Fork of mbed by mbed official

Committer:
Mikchel
Date:
Sun May 03 16:04:42 2015 +0000
Revision:
99:7f6c6de930c0
Parent:
93:e188a91d3eaa
12

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 93:e188a91d3eaa 1 /**
Kojto 93:e188a91d3eaa 2 ******************************************************************************
Kojto 93:e188a91d3eaa 3 * @file stm32f0xx_hal_smartcard_ex.h
Kojto 93:e188a91d3eaa 4 * @author MCD Application Team
Kojto 93:e188a91d3eaa 5 * @version V1.2.0
Kojto 93:e188a91d3eaa 6 * @date 11-December-2014
Kojto 93:e188a91d3eaa 7 * @brief Header file of SMARTCARD HAL module.
Kojto 93:e188a91d3eaa 8 ******************************************************************************
Kojto 93:e188a91d3eaa 9 * @attention
Kojto 93:e188a91d3eaa 10 *
Kojto 93:e188a91d3eaa 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Kojto 93:e188a91d3eaa 12 *
Kojto 93:e188a91d3eaa 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 93:e188a91d3eaa 14 * are permitted provided that the following conditions are met:
Kojto 93:e188a91d3eaa 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 93:e188a91d3eaa 16 * this list of conditions and the following disclaimer.
Kojto 93:e188a91d3eaa 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 93:e188a91d3eaa 18 * this list of conditions and the following disclaimer in the documentation
Kojto 93:e188a91d3eaa 19 * and/or other materials provided with the distribution.
Kojto 93:e188a91d3eaa 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 93:e188a91d3eaa 21 * may be used to endorse or promote products derived from this software
Kojto 93:e188a91d3eaa 22 * without specific prior written permission.
Kojto 93:e188a91d3eaa 23 *
Kojto 93:e188a91d3eaa 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 93:e188a91d3eaa 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 93:e188a91d3eaa 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 93:e188a91d3eaa 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 93:e188a91d3eaa 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 93:e188a91d3eaa 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 93:e188a91d3eaa 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 93:e188a91d3eaa 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 93:e188a91d3eaa 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 93:e188a91d3eaa 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 93:e188a91d3eaa 34 *
Kojto 93:e188a91d3eaa 35 ******************************************************************************
Kojto 93:e188a91d3eaa 36 */
Kojto 93:e188a91d3eaa 37
Kojto 93:e188a91d3eaa 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 93:e188a91d3eaa 39 #ifndef __STM32F0xx_HAL_SMARTCARD_EX_H
Kojto 93:e188a91d3eaa 40 #define __STM32F0xx_HAL_SMARTCARD_EX_H
Kojto 93:e188a91d3eaa 41
Kojto 93:e188a91d3eaa 42 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 43 extern "C" {
Kojto 93:e188a91d3eaa 44 #endif
Kojto 93:e188a91d3eaa 45
Kojto 93:e188a91d3eaa 46 #if !defined(STM32F030x6) && !defined(STM32F030x8) && !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 47
Kojto 93:e188a91d3eaa 48 /* Includes ------------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 49 #include "stm32f0xx_hal_def.h"
Kojto 93:e188a91d3eaa 50
Kojto 93:e188a91d3eaa 51 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 93:e188a91d3eaa 52 * @{
Kojto 93:e188a91d3eaa 53 */
Kojto 93:e188a91d3eaa 54
Kojto 93:e188a91d3eaa 55 /** @addtogroup SMARTCARDEx
Kojto 93:e188a91d3eaa 56 * @{
Kojto 93:e188a91d3eaa 57 */
Kojto 93:e188a91d3eaa 58
Kojto 93:e188a91d3eaa 59 /* Exported types ------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 60 /* Exported constants --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 61 /* Exported macro ------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 62
Kojto 93:e188a91d3eaa 63 /** @defgroup SMARTCARD_Extended_Exported_Macros SMARTCARDEx Exported Macros
Kojto 93:e188a91d3eaa 64 * @{
Kojto 93:e188a91d3eaa 65 */
Kojto 93:e188a91d3eaa 66
Kojto 93:e188a91d3eaa 67 /** @brief Reports the SMARTCARD clock source.
Kojto 93:e188a91d3eaa 68 * @param __HANDLE__: specifies the SMARTCARD Handle
Kojto 93:e188a91d3eaa 69 * @param __CLOCKSOURCE__ : output variable
Kojto 93:e188a91d3eaa 70 * @retval the SMARTCARD clocking source, written in __CLOCKSOURCE__.
Kojto 93:e188a91d3eaa 71 */
Kojto 93:e188a91d3eaa 72 #if defined(STM32F031x6) || defined(STM32F038xx)
Kojto 93:e188a91d3eaa 73 #define __HAL_SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
Kojto 93:e188a91d3eaa 74 do { \
Kojto 93:e188a91d3eaa 75 switch(__HAL_RCC_GET_USART1_SOURCE()) \
Kojto 93:e188a91d3eaa 76 { \
Kojto 93:e188a91d3eaa 77 case RCC_USART1CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 78 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 79 break; \
Kojto 93:e188a91d3eaa 80 case RCC_USART1CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 81 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 82 break; \
Kojto 93:e188a91d3eaa 83 case RCC_USART1CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 84 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 85 break; \
Kojto 93:e188a91d3eaa 86 case RCC_USART1CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 87 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 88 break; \
Kojto 93:e188a91d3eaa 89 default: \
Kojto 93:e188a91d3eaa 90 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 91 break; \
Kojto 93:e188a91d3eaa 92 } \
Kojto 93:e188a91d3eaa 93 } while(0)
Kojto 93:e188a91d3eaa 94 #elif defined (STM32F030x8) || \
Kojto 93:e188a91d3eaa 95 defined (STM32F042x6) || defined (STM32F048xx) || \
Kojto 93:e188a91d3eaa 96 defined (STM32F051x8) || defined (STM32F058xx)
Kojto 93:e188a91d3eaa 97 #define __HAL_SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
Kojto 93:e188a91d3eaa 98 do { \
Kojto 93:e188a91d3eaa 99 if((__HANDLE__)->Instance == USART1) \
Kojto 93:e188a91d3eaa 100 { \
Kojto 93:e188a91d3eaa 101 switch(__HAL_RCC_GET_USART1_SOURCE()) \
Kojto 93:e188a91d3eaa 102 { \
Kojto 93:e188a91d3eaa 103 case RCC_USART1CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 104 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 105 break; \
Kojto 93:e188a91d3eaa 106 case RCC_USART1CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 107 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 108 break; \
Kojto 93:e188a91d3eaa 109 case RCC_USART1CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 110 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 111 break; \
Kojto 93:e188a91d3eaa 112 case RCC_USART1CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 113 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 114 break; \
Kojto 93:e188a91d3eaa 115 default: \
Kojto 93:e188a91d3eaa 116 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 117 break; \
Kojto 93:e188a91d3eaa 118 } \
Kojto 93:e188a91d3eaa 119 } \
Kojto 93:e188a91d3eaa 120 else if((__HANDLE__)->Instance == USART2) \
Kojto 93:e188a91d3eaa 121 { \
Kojto 93:e188a91d3eaa 122 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 123 } \
Kojto 93:e188a91d3eaa 124 else \
Kojto 93:e188a91d3eaa 125 { \
Kojto 93:e188a91d3eaa 126 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 127 } \
Kojto 93:e188a91d3eaa 128 } while(0)
Kojto 93:e188a91d3eaa 129 #elif defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
Kojto 93:e188a91d3eaa 130 #define __HAL_SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
Kojto 93:e188a91d3eaa 131 do { \
Kojto 93:e188a91d3eaa 132 if((__HANDLE__)->Instance == USART1) \
Kojto 93:e188a91d3eaa 133 { \
Kojto 93:e188a91d3eaa 134 switch(__HAL_RCC_GET_USART1_SOURCE()) \
Kojto 93:e188a91d3eaa 135 { \
Kojto 93:e188a91d3eaa 136 case RCC_USART1CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 137 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 138 break; \
Kojto 93:e188a91d3eaa 139 case RCC_USART1CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 140 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 141 break; \
Kojto 93:e188a91d3eaa 142 case RCC_USART1CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 143 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 144 break; \
Kojto 93:e188a91d3eaa 145 case RCC_USART1CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 146 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 147 break; \
Kojto 93:e188a91d3eaa 148 default: \
Kojto 93:e188a91d3eaa 149 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 150 break; \
Kojto 93:e188a91d3eaa 151 } \
Kojto 93:e188a91d3eaa 152 } \
Kojto 93:e188a91d3eaa 153 else if((__HANDLE__)->Instance == USART2) \
Kojto 93:e188a91d3eaa 154 { \
Kojto 93:e188a91d3eaa 155 switch(__HAL_RCC_GET_USART2_SOURCE()) \
Kojto 93:e188a91d3eaa 156 { \
Kojto 93:e188a91d3eaa 157 case RCC_USART2CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 158 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 159 break; \
Kojto 93:e188a91d3eaa 160 case RCC_USART2CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 161 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 162 break; \
Kojto 93:e188a91d3eaa 163 case RCC_USART2CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 164 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 165 break; \
Kojto 93:e188a91d3eaa 166 case RCC_USART2CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 167 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 168 break; \
Kojto 93:e188a91d3eaa 169 default: \
Kojto 93:e188a91d3eaa 170 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 171 break; \
Kojto 93:e188a91d3eaa 172 } \
Kojto 93:e188a91d3eaa 173 } \
Kojto 93:e188a91d3eaa 174 else if((__HANDLE__)->Instance == USART3) \
Kojto 93:e188a91d3eaa 175 { \
Kojto 93:e188a91d3eaa 176 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 177 } \
Kojto 93:e188a91d3eaa 178 else if((__HANDLE__)->Instance == USART4) \
Kojto 93:e188a91d3eaa 179 { \
Kojto 93:e188a91d3eaa 180 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 181 } \
Kojto 93:e188a91d3eaa 182 else \
Kojto 93:e188a91d3eaa 183 { \
Kojto 93:e188a91d3eaa 184 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 185 } \
Kojto 93:e188a91d3eaa 186 } while(0)
Kojto 93:e188a91d3eaa 187 #elif defined(STM32F091xC) || defined(STM32F098xx)
Kojto 93:e188a91d3eaa 188 #define __HAL_SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
Kojto 93:e188a91d3eaa 189 do { \
Kojto 93:e188a91d3eaa 190 if((__HANDLE__)->Instance == USART1) \
Kojto 93:e188a91d3eaa 191 { \
Kojto 93:e188a91d3eaa 192 switch(__HAL_RCC_GET_USART1_SOURCE()) \
Kojto 93:e188a91d3eaa 193 { \
Kojto 93:e188a91d3eaa 194 case RCC_USART1CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 195 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 196 break; \
Kojto 93:e188a91d3eaa 197 case RCC_USART1CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 198 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 199 break; \
Kojto 93:e188a91d3eaa 200 case RCC_USART1CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 201 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 202 break; \
Kojto 93:e188a91d3eaa 203 case RCC_USART1CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 204 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 205 break; \
Kojto 93:e188a91d3eaa 206 default: \
Kojto 93:e188a91d3eaa 207 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 208 break; \
Kojto 93:e188a91d3eaa 209 } \
Kojto 93:e188a91d3eaa 210 } \
Kojto 93:e188a91d3eaa 211 else if((__HANDLE__)->Instance == USART2) \
Kojto 93:e188a91d3eaa 212 { \
Kojto 93:e188a91d3eaa 213 switch(__HAL_RCC_GET_USART2_SOURCE()) \
Kojto 93:e188a91d3eaa 214 { \
Kojto 93:e188a91d3eaa 215 case RCC_USART2CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 216 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 217 break; \
Kojto 93:e188a91d3eaa 218 case RCC_USART2CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 219 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 220 break; \
Kojto 93:e188a91d3eaa 221 case RCC_USART2CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 222 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 223 break; \
Kojto 93:e188a91d3eaa 224 case RCC_USART2CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 225 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 226 break; \
Kojto 93:e188a91d3eaa 227 default: \
Kojto 93:e188a91d3eaa 228 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 229 break; \
Kojto 93:e188a91d3eaa 230 } \
Kojto 93:e188a91d3eaa 231 } \
Kojto 93:e188a91d3eaa 232 else if((__HANDLE__)->Instance == USART3) \
Kojto 93:e188a91d3eaa 233 { \
Kojto 93:e188a91d3eaa 234 switch(__HAL_RCC_GET_USART3_SOURCE()) \
Kojto 93:e188a91d3eaa 235 { \
Kojto 93:e188a91d3eaa 236 case RCC_USART3CLKSOURCE_PCLK1: \
Kojto 93:e188a91d3eaa 237 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 238 break; \
Kojto 93:e188a91d3eaa 239 case RCC_USART3CLKSOURCE_HSI: \
Kojto 93:e188a91d3eaa 240 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
Kojto 93:e188a91d3eaa 241 break; \
Kojto 93:e188a91d3eaa 242 case RCC_USART3CLKSOURCE_SYSCLK: \
Kojto 93:e188a91d3eaa 243 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
Kojto 93:e188a91d3eaa 244 break; \
Kojto 93:e188a91d3eaa 245 case RCC_USART3CLKSOURCE_LSE: \
Kojto 93:e188a91d3eaa 246 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
Kojto 93:e188a91d3eaa 247 break; \
Kojto 93:e188a91d3eaa 248 default: \
Kojto 93:e188a91d3eaa 249 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 250 break; \
Kojto 93:e188a91d3eaa 251 } \
Kojto 93:e188a91d3eaa 252 } \
Kojto 93:e188a91d3eaa 253 else if((__HANDLE__)->Instance == USART4) \
Kojto 93:e188a91d3eaa 254 { \
Kojto 93:e188a91d3eaa 255 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 256 } \
Kojto 93:e188a91d3eaa 257 else if((__HANDLE__)->Instance == USART5) \
Kojto 93:e188a91d3eaa 258 { \
Kojto 93:e188a91d3eaa 259 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 260 } \
Kojto 93:e188a91d3eaa 261 else if((__HANDLE__)->Instance == USART6) \
Kojto 93:e188a91d3eaa 262 { \
Kojto 93:e188a91d3eaa 263 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 264 } \
Kojto 93:e188a91d3eaa 265 else if((__HANDLE__)->Instance == USART7) \
Kojto 93:e188a91d3eaa 266 { \
Kojto 93:e188a91d3eaa 267 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 268 } \
Kojto 93:e188a91d3eaa 269 else if((__HANDLE__)->Instance == USART8) \
Kojto 93:e188a91d3eaa 270 { \
Kojto 93:e188a91d3eaa 271 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
Kojto 93:e188a91d3eaa 272 } \
Kojto 93:e188a91d3eaa 273 else \
Kojto 93:e188a91d3eaa 274 { \
Kojto 93:e188a91d3eaa 275 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
Kojto 93:e188a91d3eaa 276 } \
Kojto 93:e188a91d3eaa 277 } while(0)
Kojto 93:e188a91d3eaa 278 #endif /* defined(STM32F031x6) || defined(STM32F038xx) */
Kojto 93:e188a91d3eaa 279
Kojto 93:e188a91d3eaa 280 /**
Kojto 93:e188a91d3eaa 281 * @}
Kojto 93:e188a91d3eaa 282 */
Kojto 93:e188a91d3eaa 283
Kojto 93:e188a91d3eaa 284 /* Exported functions --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 285
Kojto 93:e188a91d3eaa 286 /* Initialization and de-initialization functions ****************************/
Kojto 93:e188a91d3eaa 287 /* IO operation functions *****************************************************/
Kojto 93:e188a91d3eaa 288
Kojto 93:e188a91d3eaa 289 /** @addtogroup SMARTCARDEx_Exported_Functions
Kojto 93:e188a91d3eaa 290 * @{
Kojto 93:e188a91d3eaa 291 */
Kojto 93:e188a91d3eaa 292
Kojto 93:e188a91d3eaa 293 /** @addtogroup SMARTCARDEx_Exported_Functions_Group1
Kojto 93:e188a91d3eaa 294 * @{
Kojto 93:e188a91d3eaa 295 */
Kojto 93:e188a91d3eaa 296
Kojto 93:e188a91d3eaa 297 /* Peripheral Control functions ***********************************************/
Kojto 93:e188a91d3eaa 298 void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t BlockLength);
Kojto 93:e188a91d3eaa 299 void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint32_t TimeOutValue);
Kojto 93:e188a91d3eaa 300 HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsmartcard);
Kojto 93:e188a91d3eaa 301 HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsmartcard);
Kojto 93:e188a91d3eaa 302
Kojto 93:e188a91d3eaa 303 /* Peripheral State and Error functions ***************************************/
Kojto 93:e188a91d3eaa 304
Kojto 93:e188a91d3eaa 305 /**
Kojto 93:e188a91d3eaa 306 * @}
Kojto 93:e188a91d3eaa 307 */
Kojto 93:e188a91d3eaa 308
Kojto 93:e188a91d3eaa 309 /**
Kojto 93:e188a91d3eaa 310 * @}
Kojto 93:e188a91d3eaa 311 */
Kojto 93:e188a91d3eaa 312
Kojto 93:e188a91d3eaa 313 /**
Kojto 93:e188a91d3eaa 314 * @}
Kojto 93:e188a91d3eaa 315 */
Kojto 93:e188a91d3eaa 316
Kojto 93:e188a91d3eaa 317 /**
Kojto 93:e188a91d3eaa 318 * @}
Kojto 93:e188a91d3eaa 319 */
Kojto 93:e188a91d3eaa 320
Kojto 93:e188a91d3eaa 321 #endif /* !defined(STM32F030x6) && !defined(STM32F030x8)&& !defined(STM32F070x6) && !defined(STM32F070xB) && !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 322
Kojto 93:e188a91d3eaa 323 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 324 }
Kojto 93:e188a91d3eaa 325 #endif
Kojto 93:e188a91d3eaa 326
Kojto 93:e188a91d3eaa 327 #endif /* __STM32F0xx_HAL_SMARTCARD_EX_H */
Kojto 93:e188a91d3eaa 328
Kojto 93:e188a91d3eaa 329 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Kojto 93:e188a91d3eaa 330