mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

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

Committer:
mbed_official
Date:
Fri Aug 14 13:15:17 2015 +0100
Revision:
610:813dcc80987e
Parent:
573:ad23fe03a082
Synchronized with git revision 6d84db41c6833e0b9b024741eb0616a5f62d5599

Full URL: https://github.com/mbedmicro/mbed/commit/6d84db41c6833e0b9b024741eb0616a5f62d5599/

DISCO_F746NG - Improvements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 573:ad23fe03a082 1 /**
mbed_official 573:ad23fe03a082 2 ******************************************************************************
mbed_official 573:ad23fe03a082 3 * @file stm32f7xx_hal_smartcard_ex.h
mbed_official 573:ad23fe03a082 4 * @author MCD Application Team
mbed_official 610:813dcc80987e 5 * @version V1.0.1
mbed_official 610:813dcc80987e 6 * @date 25-June-2015
mbed_official 573:ad23fe03a082 7 * @brief Header file of SMARTCARD HAL module.
mbed_official 573:ad23fe03a082 8 ******************************************************************************
mbed_official 573:ad23fe03a082 9 * @attention
mbed_official 573:ad23fe03a082 10 *
mbed_official 573:ad23fe03a082 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 573:ad23fe03a082 12 *
mbed_official 573:ad23fe03a082 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 573:ad23fe03a082 14 * are permitted provided that the following conditions are met:
mbed_official 573:ad23fe03a082 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 573:ad23fe03a082 16 * this list of conditions and the following disclaimer.
mbed_official 573:ad23fe03a082 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 573:ad23fe03a082 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 573:ad23fe03a082 19 * and/or other materials provided with the distribution.
mbed_official 573:ad23fe03a082 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 573:ad23fe03a082 21 * may be used to endorse or promote products derived from this software
mbed_official 573:ad23fe03a082 22 * without specific prior written permission.
mbed_official 573:ad23fe03a082 23 *
mbed_official 573:ad23fe03a082 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 573:ad23fe03a082 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 573:ad23fe03a082 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 573:ad23fe03a082 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 573:ad23fe03a082 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 573:ad23fe03a082 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 573:ad23fe03a082 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 573:ad23fe03a082 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 573:ad23fe03a082 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 573:ad23fe03a082 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 573:ad23fe03a082 34 *
mbed_official 573:ad23fe03a082 35 ******************************************************************************
mbed_official 573:ad23fe03a082 36 */
mbed_official 573:ad23fe03a082 37
mbed_official 573:ad23fe03a082 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 573:ad23fe03a082 39 #ifndef __STM32F7xx_HAL_SMARTCARD_EX_H
mbed_official 573:ad23fe03a082 40 #define __STM32F7xx_HAL_SMARTCARD_EX_H
mbed_official 573:ad23fe03a082 41
mbed_official 573:ad23fe03a082 42 #ifdef __cplusplus
mbed_official 573:ad23fe03a082 43 extern "C" {
mbed_official 573:ad23fe03a082 44 #endif
mbed_official 573:ad23fe03a082 45
mbed_official 573:ad23fe03a082 46 /* Includes ------------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 47 #include "stm32f7xx_hal_def.h"
mbed_official 573:ad23fe03a082 48
mbed_official 573:ad23fe03a082 49 /** @addtogroup STM32F7xx_HAL_Driver
mbed_official 573:ad23fe03a082 50 * @{
mbed_official 573:ad23fe03a082 51 */
mbed_official 573:ad23fe03a082 52
mbed_official 573:ad23fe03a082 53 /** @addtogroup SMARTCARDEx
mbed_official 573:ad23fe03a082 54 * @{
mbed_official 573:ad23fe03a082 55 */
mbed_official 573:ad23fe03a082 56
mbed_official 573:ad23fe03a082 57 /* Exported types ------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 58 /* Exported constants --------------------------------------------------------*/
mbed_official 573:ad23fe03a082 59 /* Exported macro ------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 60
mbed_official 573:ad23fe03a082 61 /** @brief Reports the SMARTCARD clock source.
mbed_official 573:ad23fe03a082 62 * @param __HANDLE__: specifies the USART Handle
mbed_official 573:ad23fe03a082 63 * @param __CLOCKSOURCE__ : output variable
mbed_official 573:ad23fe03a082 64 * @retval the USART clocking source, written in __CLOCKSOURCE__.
mbed_official 573:ad23fe03a082 65 */
mbed_official 573:ad23fe03a082 66 #define SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
mbed_official 573:ad23fe03a082 67 do { \
mbed_official 573:ad23fe03a082 68 if((__HANDLE__)->Instance == USART1) \
mbed_official 573:ad23fe03a082 69 { \
mbed_official 573:ad23fe03a082 70 switch(__HAL_RCC_GET_USART1_SOURCE()) \
mbed_official 573:ad23fe03a082 71 { \
mbed_official 573:ad23fe03a082 72 case RCC_USART1CLKSOURCE_PCLK2: \
mbed_official 573:ad23fe03a082 73 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \
mbed_official 573:ad23fe03a082 74 break; \
mbed_official 573:ad23fe03a082 75 case RCC_USART1CLKSOURCE_HSI: \
mbed_official 573:ad23fe03a082 76 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
mbed_official 573:ad23fe03a082 77 break; \
mbed_official 573:ad23fe03a082 78 case RCC_USART1CLKSOURCE_SYSCLK: \
mbed_official 573:ad23fe03a082 79 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
mbed_official 573:ad23fe03a082 80 break; \
mbed_official 573:ad23fe03a082 81 case RCC_USART1CLKSOURCE_LSE: \
mbed_official 573:ad23fe03a082 82 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
mbed_official 573:ad23fe03a082 83 break; \
mbed_official 573:ad23fe03a082 84 default: \
mbed_official 573:ad23fe03a082 85 break; \
mbed_official 573:ad23fe03a082 86 } \
mbed_official 573:ad23fe03a082 87 } \
mbed_official 573:ad23fe03a082 88 else if((__HANDLE__)->Instance == USART2) \
mbed_official 573:ad23fe03a082 89 { \
mbed_official 573:ad23fe03a082 90 switch(__HAL_RCC_GET_USART2_SOURCE()) \
mbed_official 573:ad23fe03a082 91 { \
mbed_official 573:ad23fe03a082 92 case RCC_USART2CLKSOURCE_PCLK1: \
mbed_official 573:ad23fe03a082 93 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
mbed_official 573:ad23fe03a082 94 break; \
mbed_official 573:ad23fe03a082 95 case RCC_USART2CLKSOURCE_HSI: \
mbed_official 573:ad23fe03a082 96 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
mbed_official 573:ad23fe03a082 97 break; \
mbed_official 573:ad23fe03a082 98 case RCC_USART2CLKSOURCE_SYSCLK: \
mbed_official 573:ad23fe03a082 99 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
mbed_official 573:ad23fe03a082 100 break; \
mbed_official 573:ad23fe03a082 101 case RCC_USART2CLKSOURCE_LSE: \
mbed_official 573:ad23fe03a082 102 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
mbed_official 573:ad23fe03a082 103 break; \
mbed_official 573:ad23fe03a082 104 default: \
mbed_official 573:ad23fe03a082 105 break; \
mbed_official 573:ad23fe03a082 106 } \
mbed_official 573:ad23fe03a082 107 } \
mbed_official 573:ad23fe03a082 108 else if((__HANDLE__)->Instance == USART3) \
mbed_official 573:ad23fe03a082 109 { \
mbed_official 573:ad23fe03a082 110 switch(__HAL_RCC_GET_USART3_SOURCE()) \
mbed_official 573:ad23fe03a082 111 { \
mbed_official 573:ad23fe03a082 112 case RCC_USART3CLKSOURCE_PCLK1: \
mbed_official 573:ad23fe03a082 113 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
mbed_official 573:ad23fe03a082 114 break; \
mbed_official 573:ad23fe03a082 115 case RCC_USART3CLKSOURCE_HSI: \
mbed_official 573:ad23fe03a082 116 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
mbed_official 573:ad23fe03a082 117 break; \
mbed_official 573:ad23fe03a082 118 case RCC_USART3CLKSOURCE_SYSCLK: \
mbed_official 573:ad23fe03a082 119 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
mbed_official 573:ad23fe03a082 120 break; \
mbed_official 573:ad23fe03a082 121 case RCC_USART3CLKSOURCE_LSE: \
mbed_official 573:ad23fe03a082 122 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
mbed_official 573:ad23fe03a082 123 break; \
mbed_official 573:ad23fe03a082 124 default: \
mbed_official 573:ad23fe03a082 125 break; \
mbed_official 573:ad23fe03a082 126 } \
mbed_official 573:ad23fe03a082 127 } \
mbed_official 573:ad23fe03a082 128 else if((__HANDLE__)->Instance == USART6) \
mbed_official 573:ad23fe03a082 129 { \
mbed_official 573:ad23fe03a082 130 switch(__HAL_RCC_GET_USART6_SOURCE()) \
mbed_official 573:ad23fe03a082 131 { \
mbed_official 573:ad23fe03a082 132 case RCC_USART6CLKSOURCE_PCLK2: \
mbed_official 573:ad23fe03a082 133 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \
mbed_official 573:ad23fe03a082 134 break; \
mbed_official 573:ad23fe03a082 135 case RCC_USART6CLKSOURCE_HSI: \
mbed_official 573:ad23fe03a082 136 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
mbed_official 573:ad23fe03a082 137 break; \
mbed_official 573:ad23fe03a082 138 case RCC_USART6CLKSOURCE_SYSCLK: \
mbed_official 573:ad23fe03a082 139 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
mbed_official 573:ad23fe03a082 140 break; \
mbed_official 573:ad23fe03a082 141 case RCC_USART6CLKSOURCE_LSE: \
mbed_official 573:ad23fe03a082 142 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
mbed_official 573:ad23fe03a082 143 break; \
mbed_official 573:ad23fe03a082 144 default: \
mbed_official 573:ad23fe03a082 145 break; \
mbed_official 573:ad23fe03a082 146 } \
mbed_official 573:ad23fe03a082 147 } \
mbed_official 573:ad23fe03a082 148 } while(0)
mbed_official 573:ad23fe03a082 149
mbed_official 573:ad23fe03a082 150 /* Exported functions --------------------------------------------------------*/
mbed_official 573:ad23fe03a082 151 /* Initialization and de-initialization functions ****************************/
mbed_official 573:ad23fe03a082 152 /* IO operation functions *****************************************************/
mbed_official 573:ad23fe03a082 153 /* Peripheral Control functions ***********************************************/
mbed_official 573:ad23fe03a082 154 void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsc, uint8_t BlockLength);
mbed_official 573:ad23fe03a082 155 void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsc, uint32_t TimeOutValue);
mbed_official 573:ad23fe03a082 156 HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc);
mbed_official 573:ad23fe03a082 157 HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc);
mbed_official 573:ad23fe03a082 158
mbed_official 573:ad23fe03a082 159 /* Peripheral State and Error functions ***************************************/
mbed_official 573:ad23fe03a082 160
mbed_official 573:ad23fe03a082 161 /**
mbed_official 573:ad23fe03a082 162 * @}
mbed_official 573:ad23fe03a082 163 */
mbed_official 573:ad23fe03a082 164
mbed_official 573:ad23fe03a082 165 /**
mbed_official 573:ad23fe03a082 166 * @}
mbed_official 573:ad23fe03a082 167 */
mbed_official 573:ad23fe03a082 168
mbed_official 573:ad23fe03a082 169 #ifdef __cplusplus
mbed_official 573:ad23fe03a082 170 }
mbed_official 573:ad23fe03a082 171 #endif
mbed_official 573:ad23fe03a082 172
mbed_official 573:ad23fe03a082 173 #endif /* __STM32F7xx_HAL_SMARTCARD_EX_H */
mbed_official 573:ad23fe03a082 174
mbed_official 573:ad23fe03a082 175 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/