mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_L053R8/stm32l0xx_hal_smartcard_ex.h@310:6188e0254baa, 2014-09-16 (annotated)
- Committer:
- janekm
- Date:
- Tue Sep 16 22:42:01 2014 +0000
- Revision:
- 310:6188e0254baa
- Parent:
- 181:a4cbdfbbd2f4
N/A
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 181:a4cbdfbbd2f4 | 1 | /** |
mbed_official | 181:a4cbdfbbd2f4 | 2 | ****************************************************************************** |
mbed_official | 181:a4cbdfbbd2f4 | 3 | * @file stm32l0xx_hal_smartcard_ex.h |
mbed_official | 181:a4cbdfbbd2f4 | 4 | * @author MCD Application Team |
mbed_official | 181:a4cbdfbbd2f4 | 5 | * @version V1.0.0 |
mbed_official | 181:a4cbdfbbd2f4 | 6 | * @date 22-April-2014 |
mbed_official | 181:a4cbdfbbd2f4 | 7 | * @brief Header file of SMARTCARD HAL module. |
mbed_official | 181:a4cbdfbbd2f4 | 8 | ****************************************************************************** |
mbed_official | 181:a4cbdfbbd2f4 | 9 | * @attention |
mbed_official | 181:a4cbdfbbd2f4 | 10 | * |
mbed_official | 181:a4cbdfbbd2f4 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 181:a4cbdfbbd2f4 | 12 | * |
mbed_official | 181:a4cbdfbbd2f4 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 181:a4cbdfbbd2f4 | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 181:a4cbdfbbd2f4 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 181:a4cbdfbbd2f4 | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 181:a4cbdfbbd2f4 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 181:a4cbdfbbd2f4 | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 181:a4cbdfbbd2f4 | 19 | * and/or other materials provided with the distribution. |
mbed_official | 181:a4cbdfbbd2f4 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 181:a4cbdfbbd2f4 | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 181:a4cbdfbbd2f4 | 22 | * without specific prior written permission. |
mbed_official | 181:a4cbdfbbd2f4 | 23 | * |
mbed_official | 181:a4cbdfbbd2f4 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 181:a4cbdfbbd2f4 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 181:a4cbdfbbd2f4 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 181:a4cbdfbbd2f4 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 181:a4cbdfbbd2f4 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 181:a4cbdfbbd2f4 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 181:a4cbdfbbd2f4 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 181:a4cbdfbbd2f4 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 181:a4cbdfbbd2f4 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 181:a4cbdfbbd2f4 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 181:a4cbdfbbd2f4 | 34 | * |
mbed_official | 181:a4cbdfbbd2f4 | 35 | ****************************************************************************** |
mbed_official | 181:a4cbdfbbd2f4 | 36 | */ |
mbed_official | 181:a4cbdfbbd2f4 | 37 | |
mbed_official | 181:a4cbdfbbd2f4 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 181:a4cbdfbbd2f4 | 39 | #ifndef __STM32L0xx_HAL_SMARTCARD_EX_H |
mbed_official | 181:a4cbdfbbd2f4 | 40 | #define __STM32L0xx_HAL_SMARTCARD_EX_H |
mbed_official | 181:a4cbdfbbd2f4 | 41 | |
mbed_official | 181:a4cbdfbbd2f4 | 42 | #ifdef __cplusplus |
mbed_official | 181:a4cbdfbbd2f4 | 43 | extern "C" { |
mbed_official | 181:a4cbdfbbd2f4 | 44 | #endif |
mbed_official | 181:a4cbdfbbd2f4 | 45 | |
mbed_official | 181:a4cbdfbbd2f4 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 181:a4cbdfbbd2f4 | 47 | #include "stm32l0xx_hal_def.h" |
mbed_official | 181:a4cbdfbbd2f4 | 48 | |
mbed_official | 181:a4cbdfbbd2f4 | 49 | /** @addtogroup STM32L0xx_HAL_Driver |
mbed_official | 181:a4cbdfbbd2f4 | 50 | * @{ |
mbed_official | 181:a4cbdfbbd2f4 | 51 | */ |
mbed_official | 181:a4cbdfbbd2f4 | 52 | |
mbed_official | 181:a4cbdfbbd2f4 | 53 | /** @addtogroup SMARTCARDEx |
mbed_official | 181:a4cbdfbbd2f4 | 54 | * @{ |
mbed_official | 181:a4cbdfbbd2f4 | 55 | */ |
mbed_official | 181:a4cbdfbbd2f4 | 56 | |
mbed_official | 181:a4cbdfbbd2f4 | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 181:a4cbdfbbd2f4 | 58 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 181:a4cbdfbbd2f4 | 59 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 181:a4cbdfbbd2f4 | 60 | |
mbed_official | 181:a4cbdfbbd2f4 | 61 | /** @brief Reports the SMARTCARD clock source. |
mbed_official | 181:a4cbdfbbd2f4 | 62 | * @param __HANDLE__: specifies the USART Handle |
mbed_official | 181:a4cbdfbbd2f4 | 63 | * @param __CLOCKSOURCE__ : output variable |
mbed_official | 181:a4cbdfbbd2f4 | 64 | * @retval the USART clocking source, written in __CLOCKSOURCE__. |
mbed_official | 181:a4cbdfbbd2f4 | 65 | */ |
mbed_official | 181:a4cbdfbbd2f4 | 66 | #define __HAL_SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \ |
mbed_official | 181:a4cbdfbbd2f4 | 67 | do { \ |
mbed_official | 181:a4cbdfbbd2f4 | 68 | if((__HANDLE__)->Instance == USART1) \ |
mbed_official | 181:a4cbdfbbd2f4 | 69 | { \ |
mbed_official | 181:a4cbdfbbd2f4 | 70 | switch(__HAL_RCC_GET_USART1_SOURCE()) \ |
mbed_official | 181:a4cbdfbbd2f4 | 71 | { \ |
mbed_official | 181:a4cbdfbbd2f4 | 72 | case RCC_USART1CLKSOURCE_PCLK2: \ |
mbed_official | 181:a4cbdfbbd2f4 | 73 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \ |
mbed_official | 181:a4cbdfbbd2f4 | 74 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 75 | case RCC_USART1CLKSOURCE_HSI: \ |
mbed_official | 181:a4cbdfbbd2f4 | 76 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \ |
mbed_official | 181:a4cbdfbbd2f4 | 77 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 78 | case RCC_USART1CLKSOURCE_SYSCLK: \ |
mbed_official | 181:a4cbdfbbd2f4 | 79 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \ |
mbed_official | 181:a4cbdfbbd2f4 | 80 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 81 | case RCC_USART1CLKSOURCE_LSE: \ |
mbed_official | 181:a4cbdfbbd2f4 | 82 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \ |
mbed_official | 181:a4cbdfbbd2f4 | 83 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 84 | default: \ |
mbed_official | 181:a4cbdfbbd2f4 | 85 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 86 | } \ |
mbed_official | 181:a4cbdfbbd2f4 | 87 | } \ |
mbed_official | 181:a4cbdfbbd2f4 | 88 | else if((__HANDLE__)->Instance == USART2) \ |
mbed_official | 181:a4cbdfbbd2f4 | 89 | { \ |
mbed_official | 181:a4cbdfbbd2f4 | 90 | switch(__HAL_RCC_GET_USART2_SOURCE()) \ |
mbed_official | 181:a4cbdfbbd2f4 | 91 | { \ |
mbed_official | 181:a4cbdfbbd2f4 | 92 | case RCC_USART2CLKSOURCE_PCLK1: \ |
mbed_official | 181:a4cbdfbbd2f4 | 93 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \ |
mbed_official | 181:a4cbdfbbd2f4 | 94 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 95 | case RCC_USART2CLKSOURCE_HSI: \ |
mbed_official | 181:a4cbdfbbd2f4 | 96 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \ |
mbed_official | 181:a4cbdfbbd2f4 | 97 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 98 | case RCC_USART2CLKSOURCE_SYSCLK: \ |
mbed_official | 181:a4cbdfbbd2f4 | 99 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \ |
mbed_official | 181:a4cbdfbbd2f4 | 100 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 101 | case RCC_USART2CLKSOURCE_LSE: \ |
mbed_official | 181:a4cbdfbbd2f4 | 102 | (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \ |
mbed_official | 181:a4cbdfbbd2f4 | 103 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 104 | default: \ |
mbed_official | 181:a4cbdfbbd2f4 | 105 | break; \ |
mbed_official | 181:a4cbdfbbd2f4 | 106 | } \ |
mbed_official | 181:a4cbdfbbd2f4 | 107 | } \ |
mbed_official | 181:a4cbdfbbd2f4 | 108 | } while(0) |
mbed_official | 181:a4cbdfbbd2f4 | 109 | |
mbed_official | 181:a4cbdfbbd2f4 | 110 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 181:a4cbdfbbd2f4 | 111 | /* Initialization and de-initialization functions ****************************/ |
mbed_official | 181:a4cbdfbbd2f4 | 112 | /* IO operation functions *****************************************************/ |
mbed_official | 181:a4cbdfbbd2f4 | 113 | /* Peripheral Control functions ***********************************************/ |
mbed_official | 181:a4cbdfbbd2f4 | 114 | void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsc, uint8_t BlockLength); |
mbed_official | 181:a4cbdfbbd2f4 | 115 | void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsc, uint32_t TimeOutValue); |
mbed_official | 181:a4cbdfbbd2f4 | 116 | HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc); |
mbed_official | 181:a4cbdfbbd2f4 | 117 | HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc); |
mbed_official | 181:a4cbdfbbd2f4 | 118 | |
mbed_official | 181:a4cbdfbbd2f4 | 119 | /* Peripheral State and Error functions ***************************************/ |
mbed_official | 181:a4cbdfbbd2f4 | 120 | |
mbed_official | 181:a4cbdfbbd2f4 | 121 | /** |
mbed_official | 181:a4cbdfbbd2f4 | 122 | * @} |
mbed_official | 181:a4cbdfbbd2f4 | 123 | */ |
mbed_official | 181:a4cbdfbbd2f4 | 124 | |
mbed_official | 181:a4cbdfbbd2f4 | 125 | /** |
mbed_official | 181:a4cbdfbbd2f4 | 126 | * @} |
mbed_official | 181:a4cbdfbbd2f4 | 127 | */ |
mbed_official | 181:a4cbdfbbd2f4 | 128 | |
mbed_official | 181:a4cbdfbbd2f4 | 129 | #ifdef __cplusplus |
mbed_official | 181:a4cbdfbbd2f4 | 130 | } |
mbed_official | 181:a4cbdfbbd2f4 | 131 | #endif |
mbed_official | 181:a4cbdfbbd2f4 | 132 | |
mbed_official | 181:a4cbdfbbd2f4 | 133 | #endif /* __STM32L0xx_HAL_SMARTCARD_EX_H */ |
mbed_official | 181:a4cbdfbbd2f4 | 134 | |
mbed_official | 181:a4cbdfbbd2f4 | 135 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |