mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F072RB/stm32f0xx_hal_tsc.c@218:44081b78fdc2, 2014-05-30 (annotated)
- Committer:
- mbed_official
- Date:
- Fri May 30 15:30:09 2014 +0100
- Revision:
- 218:44081b78fdc2
- Parent:
- 205:c41fc65bcfb4
Synchronized with git revision d854859072d318241476ccc5f335965444d4c1d8
Full URL: https://github.com/mbedmicro/mbed/commit/d854859072d318241476ccc5f335965444d4c1d8/
[NUCLEO_F072RB] Update CubeF0 HAL driver
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 205:c41fc65bcfb4 | 1 | /** |
mbed_official | 205:c41fc65bcfb4 | 2 | ****************************************************************************** |
mbed_official | 205:c41fc65bcfb4 | 3 | * @file stm32f0xx_hal_tsc.c |
mbed_official | 205:c41fc65bcfb4 | 4 | * @author MCD Application Team |
mbed_official | 205:c41fc65bcfb4 | 5 | * @version V1.0.0 |
mbed_official | 218:44081b78fdc2 | 6 | * @date 28-May-2014 |
mbed_official | 205:c41fc65bcfb4 | 7 | * @brief This file provides firmware functions to manage the following |
mbed_official | 205:c41fc65bcfb4 | 8 | * functionalities of the Touch Sensing Controller (TSC) peripheral: |
mbed_official | 205:c41fc65bcfb4 | 9 | * + Initialization and DeInitialization |
mbed_official | 205:c41fc65bcfb4 | 10 | * + Channel IOs, Shield IOs and Sampling IOs configuration |
mbed_official | 205:c41fc65bcfb4 | 11 | * + Start and Stop an acquisition |
mbed_official | 205:c41fc65bcfb4 | 12 | * + Read acquisition result |
mbed_official | 205:c41fc65bcfb4 | 13 | * + Interrupts and flags management |
mbed_official | 205:c41fc65bcfb4 | 14 | * |
mbed_official | 205:c41fc65bcfb4 | 15 | @verbatim |
mbed_official | 205:c41fc65bcfb4 | 16 | ================================================================================ |
mbed_official | 205:c41fc65bcfb4 | 17 | ##### TSC specific features ##### |
mbed_official | 205:c41fc65bcfb4 | 18 | ================================================================================ |
mbed_official | 205:c41fc65bcfb4 | 19 | [..] |
mbed_official | 205:c41fc65bcfb4 | 20 | (#) Proven and robust surface charge transfer acquisition principle |
mbed_official | 205:c41fc65bcfb4 | 21 | |
mbed_official | 205:c41fc65bcfb4 | 22 | (#) Supports up to 3 capacitive sensing channels per group |
mbed_official | 205:c41fc65bcfb4 | 23 | |
mbed_official | 205:c41fc65bcfb4 | 24 | (#) Capacitive sensing channels can be acquired in parallel offering a very good |
mbed_official | 205:c41fc65bcfb4 | 25 | response time |
mbed_official | 205:c41fc65bcfb4 | 26 | |
mbed_official | 205:c41fc65bcfb4 | 27 | (#) Spread spectrum feature to improve system robustness in noisy environments |
mbed_official | 205:c41fc65bcfb4 | 28 | |
mbed_official | 205:c41fc65bcfb4 | 29 | (#) Full hardware management of the charge transfer acquisition sequence |
mbed_official | 205:c41fc65bcfb4 | 30 | |
mbed_official | 205:c41fc65bcfb4 | 31 | (#) Programmable charge transfer frequency |
mbed_official | 205:c41fc65bcfb4 | 32 | |
mbed_official | 205:c41fc65bcfb4 | 33 | (#) Programmable sampling capacitor I/O pin |
mbed_official | 205:c41fc65bcfb4 | 34 | |
mbed_official | 205:c41fc65bcfb4 | 35 | (#) Programmable channel I/O pin |
mbed_official | 205:c41fc65bcfb4 | 36 | |
mbed_official | 205:c41fc65bcfb4 | 37 | (#) Programmable max count value to avoid long acquisition when a channel is faulty |
mbed_official | 205:c41fc65bcfb4 | 38 | |
mbed_official | 205:c41fc65bcfb4 | 39 | (#) Dedicated end of acquisition and max count error flags with interrupt capability |
mbed_official | 205:c41fc65bcfb4 | 40 | |
mbed_official | 205:c41fc65bcfb4 | 41 | (#) One sampling capacitor for up to 3 capacitive sensing channels to reduce the system |
mbed_official | 205:c41fc65bcfb4 | 42 | components |
mbed_official | 205:c41fc65bcfb4 | 43 | |
mbed_official | 205:c41fc65bcfb4 | 44 | (#) Compatible with proximity, touchkey, linear and rotary touch sensor implementation |
mbed_official | 205:c41fc65bcfb4 | 45 | |
mbed_official | 205:c41fc65bcfb4 | 46 | |
mbed_official | 205:c41fc65bcfb4 | 47 | ##### How to use this driver ##### |
mbed_official | 205:c41fc65bcfb4 | 48 | ================================================================================ |
mbed_official | 205:c41fc65bcfb4 | 49 | [..] |
mbed_official | 205:c41fc65bcfb4 | 50 | (#) Enable the TSC interface clock using __TSC_CLK_ENABLE() macro. |
mbed_official | 205:c41fc65bcfb4 | 51 | |
mbed_official | 205:c41fc65bcfb4 | 52 | (#) GPIO pins configuration |
mbed_official | 205:c41fc65bcfb4 | 53 | (++) Enable the clock for the TSC GPIOs using __GPIOx_CLK_ENABLE() macro. |
mbed_official | 205:c41fc65bcfb4 | 54 | (++) Configure the TSC pins used as sampling IOs in alternate function output Open-Drain mode, |
mbed_official | 205:c41fc65bcfb4 | 55 | and TSC pins used as channel/shield IOs in alternate function output Push-Pull mode |
mbed_official | 205:c41fc65bcfb4 | 56 | using HAL_GPIO_Init() function. |
mbed_official | 205:c41fc65bcfb4 | 57 | (++) Configure the alternate function on all the TSC pins using HAL_xxxx() function. |
mbed_official | 205:c41fc65bcfb4 | 58 | |
mbed_official | 205:c41fc65bcfb4 | 59 | (#) Interrupts configuration |
mbed_official | 205:c41fc65bcfb4 | 60 | (++) Configure the NVIC (if the interrupt model is used) using HAL_xxx() function. |
mbed_official | 205:c41fc65bcfb4 | 61 | |
mbed_official | 205:c41fc65bcfb4 | 62 | (#) TSC configuration |
mbed_official | 205:c41fc65bcfb4 | 63 | (++) Configure all TSC parameters and used TSC IOs using HAL_TSC_Init() function. |
mbed_official | 205:c41fc65bcfb4 | 64 | |
mbed_official | 205:c41fc65bcfb4 | 65 | *** Acquisition sequence *** |
mbed_official | 205:c41fc65bcfb4 | 66 | =================================== |
mbed_official | 205:c41fc65bcfb4 | 67 | [..] |
mbed_official | 205:c41fc65bcfb4 | 68 | (+) Discharge all IOs using HAL_TSC_IODischarge() function. |
mbed_official | 205:c41fc65bcfb4 | 69 | (+) Wait a certain time allowing a good discharge of all capacitors. This delay depends |
mbed_official | 205:c41fc65bcfb4 | 70 | of the sampling capacitor and electrodes design. |
mbed_official | 205:c41fc65bcfb4 | 71 | (+) Select the channel IOs to be acquired using HAL_TSC_IOConfig() function. |
mbed_official | 205:c41fc65bcfb4 | 72 | (+) Launch the acquisition using either HAL_TSC_Start() or HAL_TSC_Start_IT() function. |
mbed_official | 205:c41fc65bcfb4 | 73 | If the synchronized mode is selected, the acquisition will start as soon as the signal |
mbed_official | 205:c41fc65bcfb4 | 74 | is received on the synchro pin. |
mbed_official | 205:c41fc65bcfb4 | 75 | (+) Wait the end of acquisition using either HAL_TSC_PollForAcquisition() or |
mbed_official | 205:c41fc65bcfb4 | 76 | HAL_TSC_GetState() function or using WFI instruction for example. |
mbed_official | 205:c41fc65bcfb4 | 77 | (+) Check the group acquisition status using HAL_TSC_GroupGetStatus() function. |
mbed_official | 205:c41fc65bcfb4 | 78 | (+) Read the acquisition value using HAL_TSC_GroupGetValue() function. |
mbed_official | 205:c41fc65bcfb4 | 79 | |
mbed_official | 205:c41fc65bcfb4 | 80 | @endverbatim |
mbed_official | 205:c41fc65bcfb4 | 81 | ****************************************************************************** |
mbed_official | 205:c41fc65bcfb4 | 82 | * @attention |
mbed_official | 205:c41fc65bcfb4 | 83 | * |
mbed_official | 205:c41fc65bcfb4 | 84 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 205:c41fc65bcfb4 | 85 | * |
mbed_official | 205:c41fc65bcfb4 | 86 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 205:c41fc65bcfb4 | 87 | * are permitted provided that the following conditions are met: |
mbed_official | 205:c41fc65bcfb4 | 88 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 205:c41fc65bcfb4 | 89 | * this list of conditions and the following disclaimer. |
mbed_official | 205:c41fc65bcfb4 | 90 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 205:c41fc65bcfb4 | 91 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 205:c41fc65bcfb4 | 92 | * and/or other materials provided with the distribution. |
mbed_official | 205:c41fc65bcfb4 | 93 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 205:c41fc65bcfb4 | 94 | * may be used to endorse or promote products derived from this software |
mbed_official | 205:c41fc65bcfb4 | 95 | * without specific prior written permission. |
mbed_official | 205:c41fc65bcfb4 | 96 | * |
mbed_official | 205:c41fc65bcfb4 | 97 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 205:c41fc65bcfb4 | 98 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 205:c41fc65bcfb4 | 99 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 205:c41fc65bcfb4 | 100 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 205:c41fc65bcfb4 | 101 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 205:c41fc65bcfb4 | 102 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 205:c41fc65bcfb4 | 103 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 205:c41fc65bcfb4 | 104 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 205:c41fc65bcfb4 | 105 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 205:c41fc65bcfb4 | 106 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 205:c41fc65bcfb4 | 107 | * |
mbed_official | 205:c41fc65bcfb4 | 108 | ****************************************************************************** |
mbed_official | 205:c41fc65bcfb4 | 109 | */ |
mbed_official | 205:c41fc65bcfb4 | 110 | |
mbed_official | 205:c41fc65bcfb4 | 111 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 112 | #include "stm32f0xx_hal.h" |
mbed_official | 205:c41fc65bcfb4 | 113 | |
mbed_official | 205:c41fc65bcfb4 | 114 | /** @addtogroup STM32F0xx_HAL_Driver |
mbed_official | 205:c41fc65bcfb4 | 115 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 116 | */ |
mbed_official | 205:c41fc65bcfb4 | 117 | |
mbed_official | 205:c41fc65bcfb4 | 118 | /** @defgroup TSC |
mbed_official | 205:c41fc65bcfb4 | 119 | * @brief HAL TSC module driver |
mbed_official | 205:c41fc65bcfb4 | 120 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 121 | */ |
mbed_official | 205:c41fc65bcfb4 | 122 | |
mbed_official | 205:c41fc65bcfb4 | 123 | #ifdef HAL_TSC_MODULE_ENABLED |
mbed_official | 205:c41fc65bcfb4 | 124 | |
mbed_official | 205:c41fc65bcfb4 | 125 | #if defined(STM32F051x8) || defined(STM32F071xB) || \ |
mbed_official | 205:c41fc65bcfb4 | 126 | defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || \ |
mbed_official | 205:c41fc65bcfb4 | 127 | defined(STM32F058xx) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 128 | |
mbed_official | 205:c41fc65bcfb4 | 129 | /* Private typedef -----------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 130 | /* Private define ------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 131 | /* Private macro -------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 132 | /* Private variables ---------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 133 | /* Private function prototypes -----------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 134 | static uint32_t TSC_extract_groups(uint32_t iomask); |
mbed_official | 205:c41fc65bcfb4 | 135 | /* Private functions ---------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 136 | |
mbed_official | 205:c41fc65bcfb4 | 137 | /** @defgroup TSC_Private_Functions |
mbed_official | 205:c41fc65bcfb4 | 138 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 139 | */ |
mbed_official | 205:c41fc65bcfb4 | 140 | |
mbed_official | 205:c41fc65bcfb4 | 141 | /** @defgroup TSC_Group1 Initialization/de-initialization functions |
mbed_official | 205:c41fc65bcfb4 | 142 | * @brief Initialization and Configuration functions |
mbed_official | 205:c41fc65bcfb4 | 143 | * |
mbed_official | 205:c41fc65bcfb4 | 144 | @verbatim |
mbed_official | 205:c41fc65bcfb4 | 145 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 146 | ##### Initialization and de-initialization functions ##### |
mbed_official | 205:c41fc65bcfb4 | 147 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 148 | [..] This section provides functions allowing to: |
mbed_official | 205:c41fc65bcfb4 | 149 | (+) Initialize and configure the TSC. |
mbed_official | 205:c41fc65bcfb4 | 150 | (+) De-initialize the TSC. |
mbed_official | 205:c41fc65bcfb4 | 151 | @endverbatim |
mbed_official | 205:c41fc65bcfb4 | 152 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 153 | */ |
mbed_official | 205:c41fc65bcfb4 | 154 | |
mbed_official | 205:c41fc65bcfb4 | 155 | /** |
mbed_official | 205:c41fc65bcfb4 | 156 | * @brief Initializes the TSC peripheral according to the specified parameters |
mbed_official | 205:c41fc65bcfb4 | 157 | * in the TSC_InitTypeDef structure. |
mbed_official | 205:c41fc65bcfb4 | 158 | * @param htsc: TSC handle |
mbed_official | 205:c41fc65bcfb4 | 159 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 160 | */ |
mbed_official | 205:c41fc65bcfb4 | 161 | HAL_StatusTypeDef HAL_TSC_Init(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 162 | { |
mbed_official | 205:c41fc65bcfb4 | 163 | /* Check TSC handle allocation */ |
mbed_official | 205:c41fc65bcfb4 | 164 | if (htsc == NULL) |
mbed_official | 205:c41fc65bcfb4 | 165 | { |
mbed_official | 205:c41fc65bcfb4 | 166 | return HAL_ERROR; |
mbed_official | 205:c41fc65bcfb4 | 167 | } |
mbed_official | 205:c41fc65bcfb4 | 168 | |
mbed_official | 205:c41fc65bcfb4 | 169 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 170 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 171 | assert_param(IS_TSC_CTPH(htsc->Init.CTPulseHighLength)); |
mbed_official | 205:c41fc65bcfb4 | 172 | assert_param(IS_TSC_CTPL(htsc->Init.CTPulseLowLength)); |
mbed_official | 205:c41fc65bcfb4 | 173 | assert_param(IS_TSC_SS(htsc->Init.SpreadSpectrum)); |
mbed_official | 205:c41fc65bcfb4 | 174 | assert_param(IS_TSC_SSD(htsc->Init.SpreadSpectrumDeviation)); |
mbed_official | 205:c41fc65bcfb4 | 175 | assert_param(IS_TSC_SS_PRESC(htsc->Init.SpreadSpectrumPrescaler)); |
mbed_official | 205:c41fc65bcfb4 | 176 | assert_param(IS_TSC_PG_PRESC(htsc->Init.PulseGeneratorPrescaler)); |
mbed_official | 205:c41fc65bcfb4 | 177 | assert_param(IS_TSC_MCV(htsc->Init.MaxCountValue)); |
mbed_official | 205:c41fc65bcfb4 | 178 | assert_param(IS_TSC_IODEF(htsc->Init.IODefaultMode)); |
mbed_official | 205:c41fc65bcfb4 | 179 | assert_param(IS_TSC_SYNC_POL(htsc->Init.SynchroPinPolarity)); |
mbed_official | 205:c41fc65bcfb4 | 180 | assert_param(IS_TSC_ACQ_MODE(htsc->Init.AcquisitionMode)); |
mbed_official | 205:c41fc65bcfb4 | 181 | assert_param(IS_TSC_MCE_IT(htsc->Init.MaxCountInterrupt)); |
mbed_official | 205:c41fc65bcfb4 | 182 | |
mbed_official | 205:c41fc65bcfb4 | 183 | /* Initialize the TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 184 | htsc->State = HAL_TSC_STATE_BUSY; |
mbed_official | 205:c41fc65bcfb4 | 185 | |
mbed_official | 205:c41fc65bcfb4 | 186 | /* Init the low level hardware : GPIO, CLOCK, CORTEX */ |
mbed_official | 205:c41fc65bcfb4 | 187 | HAL_TSC_MspInit(htsc); |
mbed_official | 205:c41fc65bcfb4 | 188 | |
mbed_official | 205:c41fc65bcfb4 | 189 | /*--------------------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 190 | /* Set TSC parameters */ |
mbed_official | 205:c41fc65bcfb4 | 191 | |
mbed_official | 205:c41fc65bcfb4 | 192 | /* Enable TSC */ |
mbed_official | 205:c41fc65bcfb4 | 193 | htsc->Instance->CR = TSC_CR_TSCE; |
mbed_official | 205:c41fc65bcfb4 | 194 | |
mbed_official | 205:c41fc65bcfb4 | 195 | /* Set all functions */ |
mbed_official | 205:c41fc65bcfb4 | 196 | htsc->Instance->CR |= (htsc->Init.CTPulseHighLength | |
mbed_official | 205:c41fc65bcfb4 | 197 | htsc->Init.CTPulseLowLength | |
mbed_official | 205:c41fc65bcfb4 | 198 | (uint32_t)(htsc->Init.SpreadSpectrumDeviation << 17) | |
mbed_official | 205:c41fc65bcfb4 | 199 | htsc->Init.SpreadSpectrumPrescaler | |
mbed_official | 205:c41fc65bcfb4 | 200 | htsc->Init.PulseGeneratorPrescaler | |
mbed_official | 205:c41fc65bcfb4 | 201 | htsc->Init.MaxCountValue | |
mbed_official | 205:c41fc65bcfb4 | 202 | htsc->Init.IODefaultMode | |
mbed_official | 205:c41fc65bcfb4 | 203 | htsc->Init.SynchroPinPolarity | |
mbed_official | 205:c41fc65bcfb4 | 204 | htsc->Init.AcquisitionMode); |
mbed_official | 205:c41fc65bcfb4 | 205 | |
mbed_official | 205:c41fc65bcfb4 | 206 | /* Spread spectrum */ |
mbed_official | 205:c41fc65bcfb4 | 207 | if (htsc->Init.SpreadSpectrum == ENABLE) |
mbed_official | 205:c41fc65bcfb4 | 208 | { |
mbed_official | 205:c41fc65bcfb4 | 209 | htsc->Instance->CR |= TSC_CR_SSE; |
mbed_official | 205:c41fc65bcfb4 | 210 | } |
mbed_official | 205:c41fc65bcfb4 | 211 | |
mbed_official | 205:c41fc65bcfb4 | 212 | /* Disable Schmitt trigger hysteresis on all used TSC IOs */ |
mbed_official | 205:c41fc65bcfb4 | 213 | htsc->Instance->IOHCR = (uint32_t)(~(htsc->Init.ChannelIOs | htsc->Init.ShieldIOs | htsc->Init.SamplingIOs)); |
mbed_official | 205:c41fc65bcfb4 | 214 | |
mbed_official | 205:c41fc65bcfb4 | 215 | /* Set channel and shield IOs */ |
mbed_official | 205:c41fc65bcfb4 | 216 | htsc->Instance->IOCCR = (htsc->Init.ChannelIOs | htsc->Init.ShieldIOs); |
mbed_official | 205:c41fc65bcfb4 | 217 | |
mbed_official | 205:c41fc65bcfb4 | 218 | /* Set sampling IOs */ |
mbed_official | 205:c41fc65bcfb4 | 219 | htsc->Instance->IOSCR = htsc->Init.SamplingIOs; |
mbed_official | 205:c41fc65bcfb4 | 220 | |
mbed_official | 205:c41fc65bcfb4 | 221 | /* Set the groups to be acquired */ |
mbed_official | 205:c41fc65bcfb4 | 222 | htsc->Instance->IOGCSR = TSC_extract_groups(htsc->Init.ChannelIOs); |
mbed_official | 205:c41fc65bcfb4 | 223 | |
mbed_official | 205:c41fc65bcfb4 | 224 | /* Clear interrupts */ |
mbed_official | 205:c41fc65bcfb4 | 225 | htsc->Instance->IER &= (uint32_t)(~(TSC_IT_EOA | TSC_IT_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 226 | |
mbed_official | 205:c41fc65bcfb4 | 227 | /* Clear flags */ |
mbed_official | 205:c41fc65bcfb4 | 228 | htsc->Instance->ICR |= (TSC_FLAG_EOA | TSC_FLAG_MCE); |
mbed_official | 205:c41fc65bcfb4 | 229 | |
mbed_official | 205:c41fc65bcfb4 | 230 | /*--------------------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 231 | |
mbed_official | 205:c41fc65bcfb4 | 232 | /* Initialize the TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 233 | htsc->State = HAL_TSC_STATE_READY; |
mbed_official | 205:c41fc65bcfb4 | 234 | |
mbed_official | 205:c41fc65bcfb4 | 235 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 236 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 237 | } |
mbed_official | 205:c41fc65bcfb4 | 238 | |
mbed_official | 205:c41fc65bcfb4 | 239 | /** |
mbed_official | 205:c41fc65bcfb4 | 240 | * @brief Deinitializes the TSC peripheral registers to their default reset values. |
mbed_official | 205:c41fc65bcfb4 | 241 | * @param htsc: TSC handle |
mbed_official | 205:c41fc65bcfb4 | 242 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 243 | */ |
mbed_official | 205:c41fc65bcfb4 | 244 | HAL_StatusTypeDef HAL_TSC_DeInit(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 245 | { |
mbed_official | 205:c41fc65bcfb4 | 246 | /* Check TSC handle allocation */ |
mbed_official | 205:c41fc65bcfb4 | 247 | if (htsc == NULL) |
mbed_official | 205:c41fc65bcfb4 | 248 | { |
mbed_official | 205:c41fc65bcfb4 | 249 | return HAL_ERROR; |
mbed_official | 205:c41fc65bcfb4 | 250 | } |
mbed_official | 205:c41fc65bcfb4 | 251 | |
mbed_official | 205:c41fc65bcfb4 | 252 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 253 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 254 | |
mbed_official | 205:c41fc65bcfb4 | 255 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 256 | htsc->State = HAL_TSC_STATE_BUSY; |
mbed_official | 205:c41fc65bcfb4 | 257 | |
mbed_official | 205:c41fc65bcfb4 | 258 | /* DeInit the low level hardware */ |
mbed_official | 205:c41fc65bcfb4 | 259 | HAL_TSC_MspDeInit(htsc); |
mbed_official | 205:c41fc65bcfb4 | 260 | |
mbed_official | 205:c41fc65bcfb4 | 261 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 262 | htsc->State = HAL_TSC_STATE_RESET; |
mbed_official | 205:c41fc65bcfb4 | 263 | |
mbed_official | 205:c41fc65bcfb4 | 264 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 265 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 266 | |
mbed_official | 205:c41fc65bcfb4 | 267 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 268 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 269 | } |
mbed_official | 205:c41fc65bcfb4 | 270 | |
mbed_official | 205:c41fc65bcfb4 | 271 | /** |
mbed_official | 205:c41fc65bcfb4 | 272 | * @brief Initializes the TSC MSP. |
mbed_official | 205:c41fc65bcfb4 | 273 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 274 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 275 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 276 | */ |
mbed_official | 205:c41fc65bcfb4 | 277 | __weak void HAL_TSC_MspInit(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 278 | { |
mbed_official | 205:c41fc65bcfb4 | 279 | /* NOTE : This function should not be modified, when the callback is needed, |
mbed_official | 205:c41fc65bcfb4 | 280 | the HAL_TSC_MspInit could be implemented in the user file. |
mbed_official | 205:c41fc65bcfb4 | 281 | */ |
mbed_official | 205:c41fc65bcfb4 | 282 | } |
mbed_official | 205:c41fc65bcfb4 | 283 | |
mbed_official | 205:c41fc65bcfb4 | 284 | /** |
mbed_official | 205:c41fc65bcfb4 | 285 | * @brief DeInitializes the TSC MSP. |
mbed_official | 205:c41fc65bcfb4 | 286 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 287 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 288 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 289 | */ |
mbed_official | 205:c41fc65bcfb4 | 290 | __weak void HAL_TSC_MspDeInit(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 291 | { |
mbed_official | 205:c41fc65bcfb4 | 292 | /* NOTE : This function should not be modified, when the callback is needed, |
mbed_official | 205:c41fc65bcfb4 | 293 | the HAL_TSC_MspDeInit could be implemented in the user file. |
mbed_official | 205:c41fc65bcfb4 | 294 | */ |
mbed_official | 205:c41fc65bcfb4 | 295 | } |
mbed_official | 205:c41fc65bcfb4 | 296 | |
mbed_official | 205:c41fc65bcfb4 | 297 | /** |
mbed_official | 205:c41fc65bcfb4 | 298 | * @} |
mbed_official | 205:c41fc65bcfb4 | 299 | */ |
mbed_official | 205:c41fc65bcfb4 | 300 | |
mbed_official | 205:c41fc65bcfb4 | 301 | /** @defgroup HAL_TSC_Group2 IO operation functions |
mbed_official | 205:c41fc65bcfb4 | 302 | * @brief IO operation functions |
mbed_official | 205:c41fc65bcfb4 | 303 | * |
mbed_official | 205:c41fc65bcfb4 | 304 | @verbatim |
mbed_official | 205:c41fc65bcfb4 | 305 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 306 | ##### I/O Operation functions ##### |
mbed_official | 205:c41fc65bcfb4 | 307 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 308 | [..] This section provides functions allowing to: |
mbed_official | 205:c41fc65bcfb4 | 309 | (+) Start acquisition in polling mode. |
mbed_official | 205:c41fc65bcfb4 | 310 | (+) Start acquisition in interrupt mode. |
mbed_official | 205:c41fc65bcfb4 | 311 | (+) Stop conversion in polling mode. |
mbed_official | 205:c41fc65bcfb4 | 312 | (+) Stop conversion in interrupt mode. |
mbed_official | 205:c41fc65bcfb4 | 313 | (+) Get group acquisition status. |
mbed_official | 205:c41fc65bcfb4 | 314 | (+) Get group acquisition value. |
mbed_official | 205:c41fc65bcfb4 | 315 | @endverbatim |
mbed_official | 205:c41fc65bcfb4 | 316 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 317 | */ |
mbed_official | 205:c41fc65bcfb4 | 318 | |
mbed_official | 205:c41fc65bcfb4 | 319 | /** |
mbed_official | 205:c41fc65bcfb4 | 320 | * @brief Starts the acquisition. |
mbed_official | 205:c41fc65bcfb4 | 321 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 322 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 323 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 324 | */ |
mbed_official | 205:c41fc65bcfb4 | 325 | HAL_StatusTypeDef HAL_TSC_Start(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 326 | { |
mbed_official | 205:c41fc65bcfb4 | 327 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 328 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 329 | |
mbed_official | 205:c41fc65bcfb4 | 330 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 331 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 332 | |
mbed_official | 205:c41fc65bcfb4 | 333 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 334 | htsc->State = HAL_TSC_STATE_BUSY; |
mbed_official | 205:c41fc65bcfb4 | 335 | |
mbed_official | 205:c41fc65bcfb4 | 336 | /* Clear interrupts */ |
mbed_official | 205:c41fc65bcfb4 | 337 | __HAL_TSC_DISABLE_IT(htsc, (TSC_IT_EOA | TSC_IT_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 338 | |
mbed_official | 205:c41fc65bcfb4 | 339 | /* Clear flags */ |
mbed_official | 205:c41fc65bcfb4 | 340 | __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 341 | |
mbed_official | 205:c41fc65bcfb4 | 342 | /* Stop discharging the IOs */ |
mbed_official | 205:c41fc65bcfb4 | 343 | __HAL_TSC_SET_IODEF_INFLOAT(htsc); |
mbed_official | 205:c41fc65bcfb4 | 344 | |
mbed_official | 205:c41fc65bcfb4 | 345 | /* Launch the acquisition */ |
mbed_official | 205:c41fc65bcfb4 | 346 | __HAL_TSC_START_ACQ(htsc); |
mbed_official | 205:c41fc65bcfb4 | 347 | |
mbed_official | 205:c41fc65bcfb4 | 348 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 349 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 350 | |
mbed_official | 205:c41fc65bcfb4 | 351 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 352 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 353 | } |
mbed_official | 205:c41fc65bcfb4 | 354 | |
mbed_official | 205:c41fc65bcfb4 | 355 | /** |
mbed_official | 205:c41fc65bcfb4 | 356 | * @brief Enables the interrupt and starts the acquisition |
mbed_official | 205:c41fc65bcfb4 | 357 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 358 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 359 | * @retval HAL status. |
mbed_official | 205:c41fc65bcfb4 | 360 | */ |
mbed_official | 205:c41fc65bcfb4 | 361 | HAL_StatusTypeDef HAL_TSC_Start_IT(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 362 | { |
mbed_official | 205:c41fc65bcfb4 | 363 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 364 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 365 | assert_param(IS_TSC_MCE_IT(htsc->Init.MaxCountInterrupt)); |
mbed_official | 205:c41fc65bcfb4 | 366 | |
mbed_official | 205:c41fc65bcfb4 | 367 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 368 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 369 | |
mbed_official | 205:c41fc65bcfb4 | 370 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 371 | htsc->State = HAL_TSC_STATE_BUSY; |
mbed_official | 205:c41fc65bcfb4 | 372 | |
mbed_official | 205:c41fc65bcfb4 | 373 | /* Enable end of acquisition interrupt */ |
mbed_official | 205:c41fc65bcfb4 | 374 | __HAL_TSC_ENABLE_IT(htsc, TSC_IT_EOA); |
mbed_official | 205:c41fc65bcfb4 | 375 | |
mbed_official | 205:c41fc65bcfb4 | 376 | /* Enable max count error interrupt (optional) */ |
mbed_official | 205:c41fc65bcfb4 | 377 | if (htsc->Init.MaxCountInterrupt == ENABLE) |
mbed_official | 205:c41fc65bcfb4 | 378 | { |
mbed_official | 205:c41fc65bcfb4 | 379 | __HAL_TSC_ENABLE_IT(htsc, TSC_IT_MCE); |
mbed_official | 205:c41fc65bcfb4 | 380 | } |
mbed_official | 205:c41fc65bcfb4 | 381 | else |
mbed_official | 205:c41fc65bcfb4 | 382 | { |
mbed_official | 205:c41fc65bcfb4 | 383 | __HAL_TSC_DISABLE_IT(htsc, TSC_IT_MCE); |
mbed_official | 205:c41fc65bcfb4 | 384 | } |
mbed_official | 205:c41fc65bcfb4 | 385 | |
mbed_official | 205:c41fc65bcfb4 | 386 | /* Clear flags */ |
mbed_official | 205:c41fc65bcfb4 | 387 | __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 388 | |
mbed_official | 205:c41fc65bcfb4 | 389 | /* Stop discharging the IOs */ |
mbed_official | 205:c41fc65bcfb4 | 390 | __HAL_TSC_SET_IODEF_INFLOAT(htsc); |
mbed_official | 205:c41fc65bcfb4 | 391 | |
mbed_official | 205:c41fc65bcfb4 | 392 | /* Launch the acquisition */ |
mbed_official | 205:c41fc65bcfb4 | 393 | __HAL_TSC_START_ACQ(htsc); |
mbed_official | 205:c41fc65bcfb4 | 394 | |
mbed_official | 205:c41fc65bcfb4 | 395 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 396 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 397 | |
mbed_official | 205:c41fc65bcfb4 | 398 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 399 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 400 | } |
mbed_official | 205:c41fc65bcfb4 | 401 | |
mbed_official | 205:c41fc65bcfb4 | 402 | /** |
mbed_official | 205:c41fc65bcfb4 | 403 | * @brief Stops the acquisition previously launched in polling mode |
mbed_official | 205:c41fc65bcfb4 | 404 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 405 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 406 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 407 | */ |
mbed_official | 205:c41fc65bcfb4 | 408 | HAL_StatusTypeDef HAL_TSC_Stop(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 409 | { |
mbed_official | 205:c41fc65bcfb4 | 410 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 411 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 412 | |
mbed_official | 205:c41fc65bcfb4 | 413 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 414 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 415 | |
mbed_official | 205:c41fc65bcfb4 | 416 | /* Stop the acquisition */ |
mbed_official | 205:c41fc65bcfb4 | 417 | __HAL_TSC_STOP_ACQ(htsc); |
mbed_official | 205:c41fc65bcfb4 | 418 | |
mbed_official | 205:c41fc65bcfb4 | 419 | /* Clear flags */ |
mbed_official | 205:c41fc65bcfb4 | 420 | __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 421 | |
mbed_official | 205:c41fc65bcfb4 | 422 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 423 | htsc->State = HAL_TSC_STATE_READY; |
mbed_official | 205:c41fc65bcfb4 | 424 | |
mbed_official | 205:c41fc65bcfb4 | 425 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 426 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 427 | |
mbed_official | 205:c41fc65bcfb4 | 428 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 429 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 430 | } |
mbed_official | 205:c41fc65bcfb4 | 431 | |
mbed_official | 205:c41fc65bcfb4 | 432 | /** |
mbed_official | 205:c41fc65bcfb4 | 433 | * @brief Stops the acquisition previously launched in interrupt mode |
mbed_official | 205:c41fc65bcfb4 | 434 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 435 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 436 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 437 | */ |
mbed_official | 205:c41fc65bcfb4 | 438 | HAL_StatusTypeDef HAL_TSC_Stop_IT(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 439 | { |
mbed_official | 205:c41fc65bcfb4 | 440 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 441 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 442 | |
mbed_official | 205:c41fc65bcfb4 | 443 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 444 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 445 | |
mbed_official | 205:c41fc65bcfb4 | 446 | /* Stop the acquisition */ |
mbed_official | 205:c41fc65bcfb4 | 447 | __HAL_TSC_STOP_ACQ(htsc); |
mbed_official | 205:c41fc65bcfb4 | 448 | |
mbed_official | 205:c41fc65bcfb4 | 449 | /* Disable interrupts */ |
mbed_official | 205:c41fc65bcfb4 | 450 | __HAL_TSC_DISABLE_IT(htsc, (TSC_IT_EOA | TSC_IT_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 451 | |
mbed_official | 205:c41fc65bcfb4 | 452 | /* Clear flags */ |
mbed_official | 205:c41fc65bcfb4 | 453 | __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE)); |
mbed_official | 205:c41fc65bcfb4 | 454 | |
mbed_official | 205:c41fc65bcfb4 | 455 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 456 | htsc->State = HAL_TSC_STATE_READY; |
mbed_official | 205:c41fc65bcfb4 | 457 | |
mbed_official | 205:c41fc65bcfb4 | 458 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 459 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 460 | |
mbed_official | 205:c41fc65bcfb4 | 461 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 462 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 463 | } |
mbed_official | 205:c41fc65bcfb4 | 464 | |
mbed_official | 205:c41fc65bcfb4 | 465 | /** |
mbed_official | 205:c41fc65bcfb4 | 466 | * @brief Gets the acquisition status for a group |
mbed_official | 205:c41fc65bcfb4 | 467 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 468 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 469 | * @param gx_index: Index of the group |
mbed_official | 205:c41fc65bcfb4 | 470 | * @retval Group status |
mbed_official | 205:c41fc65bcfb4 | 471 | */ |
mbed_official | 205:c41fc65bcfb4 | 472 | TSC_GroupStatusTypeDef HAL_TSC_GroupGetStatus(TSC_HandleTypeDef* htsc, uint32_t gx_index) |
mbed_official | 205:c41fc65bcfb4 | 473 | { |
mbed_official | 205:c41fc65bcfb4 | 474 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 475 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 476 | assert_param(IS_GROUP_INDEX(gx_index)); |
mbed_official | 205:c41fc65bcfb4 | 477 | |
mbed_official | 205:c41fc65bcfb4 | 478 | /* Return the group status */ |
mbed_official | 205:c41fc65bcfb4 | 479 | return(__HAL_TSC_GET_GROUP_STATUS(htsc, gx_index)); |
mbed_official | 205:c41fc65bcfb4 | 480 | } |
mbed_official | 205:c41fc65bcfb4 | 481 | |
mbed_official | 205:c41fc65bcfb4 | 482 | /** |
mbed_official | 205:c41fc65bcfb4 | 483 | * @brief Gets the acquisition measure for a group |
mbed_official | 205:c41fc65bcfb4 | 484 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 485 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 486 | * @param gx_index: Index of the group |
mbed_official | 205:c41fc65bcfb4 | 487 | * @retval Acquisition measure |
mbed_official | 205:c41fc65bcfb4 | 488 | */ |
mbed_official | 205:c41fc65bcfb4 | 489 | uint32_t HAL_TSC_GroupGetValue(TSC_HandleTypeDef* htsc, uint32_t gx_index) |
mbed_official | 205:c41fc65bcfb4 | 490 | { |
mbed_official | 205:c41fc65bcfb4 | 491 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 492 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 493 | assert_param(IS_GROUP_INDEX(gx_index)); |
mbed_official | 205:c41fc65bcfb4 | 494 | |
mbed_official | 205:c41fc65bcfb4 | 495 | /* Return the group acquisition counter */ |
mbed_official | 205:c41fc65bcfb4 | 496 | return htsc->Instance->IOGXCR[gx_index]; |
mbed_official | 205:c41fc65bcfb4 | 497 | } |
mbed_official | 205:c41fc65bcfb4 | 498 | |
mbed_official | 205:c41fc65bcfb4 | 499 | /** |
mbed_official | 205:c41fc65bcfb4 | 500 | * @} |
mbed_official | 205:c41fc65bcfb4 | 501 | */ |
mbed_official | 205:c41fc65bcfb4 | 502 | |
mbed_official | 205:c41fc65bcfb4 | 503 | /** @defgroup HAL_TSC_Group3 Peripheral Control functions |
mbed_official | 205:c41fc65bcfb4 | 504 | * @brief Peripheral Control functions |
mbed_official | 205:c41fc65bcfb4 | 505 | * |
mbed_official | 205:c41fc65bcfb4 | 506 | @verbatim |
mbed_official | 205:c41fc65bcfb4 | 507 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 508 | ##### Peripheral Control functions ##### |
mbed_official | 205:c41fc65bcfb4 | 509 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 510 | [..] This section provides functions allowing to: |
mbed_official | 205:c41fc65bcfb4 | 511 | (+) Configure TSC IOs |
mbed_official | 205:c41fc65bcfb4 | 512 | (+) Discharge TSC IOs |
mbed_official | 205:c41fc65bcfb4 | 513 | @endverbatim |
mbed_official | 205:c41fc65bcfb4 | 514 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 515 | */ |
mbed_official | 205:c41fc65bcfb4 | 516 | |
mbed_official | 205:c41fc65bcfb4 | 517 | /** |
mbed_official | 205:c41fc65bcfb4 | 518 | * @brief Configures TSC IOs |
mbed_official | 205:c41fc65bcfb4 | 519 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 520 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 521 | * @param config: pointer to the configuration structure. |
mbed_official | 205:c41fc65bcfb4 | 522 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 523 | */ |
mbed_official | 205:c41fc65bcfb4 | 524 | HAL_StatusTypeDef HAL_TSC_IOConfig(TSC_HandleTypeDef* htsc, TSC_IOConfigTypeDef* config) |
mbed_official | 205:c41fc65bcfb4 | 525 | { |
mbed_official | 205:c41fc65bcfb4 | 526 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 527 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 528 | |
mbed_official | 205:c41fc65bcfb4 | 529 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 530 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 531 | |
mbed_official | 205:c41fc65bcfb4 | 532 | /* Stop acquisition */ |
mbed_official | 205:c41fc65bcfb4 | 533 | __HAL_TSC_STOP_ACQ(htsc); |
mbed_official | 205:c41fc65bcfb4 | 534 | |
mbed_official | 205:c41fc65bcfb4 | 535 | /* Disable Schmitt trigger hysteresis on all used TSC IOs */ |
mbed_official | 205:c41fc65bcfb4 | 536 | htsc->Instance->IOHCR = (uint32_t)(~(config->ChannelIOs | config->ShieldIOs | config->SamplingIOs)); |
mbed_official | 205:c41fc65bcfb4 | 537 | |
mbed_official | 205:c41fc65bcfb4 | 538 | /* Set channel and shield IOs */ |
mbed_official | 205:c41fc65bcfb4 | 539 | htsc->Instance->IOCCR = (config->ChannelIOs | config->ShieldIOs); |
mbed_official | 205:c41fc65bcfb4 | 540 | |
mbed_official | 205:c41fc65bcfb4 | 541 | /* Set sampling IOs */ |
mbed_official | 205:c41fc65bcfb4 | 542 | htsc->Instance->IOSCR = config->SamplingIOs; |
mbed_official | 205:c41fc65bcfb4 | 543 | |
mbed_official | 205:c41fc65bcfb4 | 544 | /* Set groups to be acquired */ |
mbed_official | 205:c41fc65bcfb4 | 545 | htsc->Instance->IOGCSR = TSC_extract_groups(config->ChannelIOs); |
mbed_official | 205:c41fc65bcfb4 | 546 | |
mbed_official | 205:c41fc65bcfb4 | 547 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 548 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 549 | |
mbed_official | 205:c41fc65bcfb4 | 550 | /* Return function status */ |
mbed_official | 205:c41fc65bcfb4 | 551 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 552 | } |
mbed_official | 205:c41fc65bcfb4 | 553 | |
mbed_official | 205:c41fc65bcfb4 | 554 | /** |
mbed_official | 205:c41fc65bcfb4 | 555 | * @brief Discharge TSC IOs |
mbed_official | 205:c41fc65bcfb4 | 556 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 557 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 558 | * @param choice: enable or disable |
mbed_official | 205:c41fc65bcfb4 | 559 | * @retval HAL status |
mbed_official | 205:c41fc65bcfb4 | 560 | */ |
mbed_official | 205:c41fc65bcfb4 | 561 | HAL_StatusTypeDef HAL_TSC_IODischarge(TSC_HandleTypeDef* htsc, uint32_t choice) |
mbed_official | 205:c41fc65bcfb4 | 562 | { |
mbed_official | 205:c41fc65bcfb4 | 563 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 564 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 565 | |
mbed_official | 205:c41fc65bcfb4 | 566 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 567 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 568 | |
mbed_official | 205:c41fc65bcfb4 | 569 | if (choice == ENABLE) |
mbed_official | 205:c41fc65bcfb4 | 570 | { |
mbed_official | 205:c41fc65bcfb4 | 571 | __HAL_TSC_SET_IODEF_OUTPPLOW(htsc); |
mbed_official | 205:c41fc65bcfb4 | 572 | } |
mbed_official | 205:c41fc65bcfb4 | 573 | else |
mbed_official | 205:c41fc65bcfb4 | 574 | { |
mbed_official | 205:c41fc65bcfb4 | 575 | __HAL_TSC_SET_IODEF_INFLOAT(htsc); |
mbed_official | 205:c41fc65bcfb4 | 576 | } |
mbed_official | 205:c41fc65bcfb4 | 577 | |
mbed_official | 205:c41fc65bcfb4 | 578 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 579 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 580 | |
mbed_official | 205:c41fc65bcfb4 | 581 | /* Return the group acquisition counter */ |
mbed_official | 205:c41fc65bcfb4 | 582 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 583 | } |
mbed_official | 205:c41fc65bcfb4 | 584 | |
mbed_official | 205:c41fc65bcfb4 | 585 | /** |
mbed_official | 205:c41fc65bcfb4 | 586 | * @} |
mbed_official | 205:c41fc65bcfb4 | 587 | */ |
mbed_official | 205:c41fc65bcfb4 | 588 | |
mbed_official | 205:c41fc65bcfb4 | 589 | /** @defgroup HAL_TSC_Group4 State functions |
mbed_official | 205:c41fc65bcfb4 | 590 | * @brief State functions |
mbed_official | 205:c41fc65bcfb4 | 591 | * |
mbed_official | 205:c41fc65bcfb4 | 592 | @verbatim |
mbed_official | 205:c41fc65bcfb4 | 593 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 594 | ##### State functions ##### |
mbed_official | 205:c41fc65bcfb4 | 595 | =============================================================================== |
mbed_official | 205:c41fc65bcfb4 | 596 | [..] |
mbed_official | 205:c41fc65bcfb4 | 597 | This subsection provides functions allowing to |
mbed_official | 205:c41fc65bcfb4 | 598 | (+) Get TSC state. |
mbed_official | 205:c41fc65bcfb4 | 599 | (+) Poll for acquisition completed. |
mbed_official | 205:c41fc65bcfb4 | 600 | (+) Handles TSC interrupt request. |
mbed_official | 205:c41fc65bcfb4 | 601 | |
mbed_official | 205:c41fc65bcfb4 | 602 | @endverbatim |
mbed_official | 205:c41fc65bcfb4 | 603 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 604 | */ |
mbed_official | 205:c41fc65bcfb4 | 605 | |
mbed_official | 205:c41fc65bcfb4 | 606 | /** |
mbed_official | 205:c41fc65bcfb4 | 607 | * @brief Return the TSC state |
mbed_official | 205:c41fc65bcfb4 | 608 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 609 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 610 | * @retval HAL state |
mbed_official | 205:c41fc65bcfb4 | 611 | */ |
mbed_official | 205:c41fc65bcfb4 | 612 | HAL_TSC_StateTypeDef HAL_TSC_GetState(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 613 | { |
mbed_official | 205:c41fc65bcfb4 | 614 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 615 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 616 | |
mbed_official | 205:c41fc65bcfb4 | 617 | if (htsc->State == HAL_TSC_STATE_BUSY) |
mbed_official | 205:c41fc65bcfb4 | 618 | { |
mbed_official | 205:c41fc65bcfb4 | 619 | /* Check end of acquisition flag */ |
mbed_official | 205:c41fc65bcfb4 | 620 | if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_EOA) != RESET) |
mbed_official | 205:c41fc65bcfb4 | 621 | { |
mbed_official | 205:c41fc65bcfb4 | 622 | /* Check max count error flag */ |
mbed_official | 205:c41fc65bcfb4 | 623 | if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_MCE) != RESET) |
mbed_official | 205:c41fc65bcfb4 | 624 | { |
mbed_official | 205:c41fc65bcfb4 | 625 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 626 | htsc->State = HAL_TSC_STATE_ERROR; |
mbed_official | 205:c41fc65bcfb4 | 627 | } |
mbed_official | 205:c41fc65bcfb4 | 628 | else |
mbed_official | 205:c41fc65bcfb4 | 629 | { |
mbed_official | 205:c41fc65bcfb4 | 630 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 631 | htsc->State = HAL_TSC_STATE_READY; |
mbed_official | 205:c41fc65bcfb4 | 632 | } |
mbed_official | 205:c41fc65bcfb4 | 633 | } |
mbed_official | 205:c41fc65bcfb4 | 634 | } |
mbed_official | 205:c41fc65bcfb4 | 635 | |
mbed_official | 205:c41fc65bcfb4 | 636 | /* Return TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 637 | return htsc->State; |
mbed_official | 205:c41fc65bcfb4 | 638 | } |
mbed_official | 205:c41fc65bcfb4 | 639 | |
mbed_official | 205:c41fc65bcfb4 | 640 | /** |
mbed_official | 205:c41fc65bcfb4 | 641 | * @brief Start acquisition and wait until completion |
mbed_official | 205:c41fc65bcfb4 | 642 | * @note There is no need of a timeout parameter as the max count error is already |
mbed_official | 205:c41fc65bcfb4 | 643 | * managed by the TSC peripheral. |
mbed_official | 205:c41fc65bcfb4 | 644 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 645 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 646 | * @retval HAL state |
mbed_official | 205:c41fc65bcfb4 | 647 | */ |
mbed_official | 205:c41fc65bcfb4 | 648 | HAL_StatusTypeDef HAL_TSC_PollForAcquisition(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 649 | { |
mbed_official | 205:c41fc65bcfb4 | 650 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 651 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 652 | |
mbed_official | 205:c41fc65bcfb4 | 653 | /* Process locked */ |
mbed_official | 205:c41fc65bcfb4 | 654 | __HAL_LOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 655 | |
mbed_official | 205:c41fc65bcfb4 | 656 | /* Check end of acquisition */ |
mbed_official | 205:c41fc65bcfb4 | 657 | while (HAL_TSC_GetState(htsc) == HAL_TSC_STATE_BUSY) |
mbed_official | 205:c41fc65bcfb4 | 658 | { |
mbed_official | 205:c41fc65bcfb4 | 659 | /* The timeout (max count error) is managed by the TSC peripheral itself. */ |
mbed_official | 205:c41fc65bcfb4 | 660 | } |
mbed_official | 205:c41fc65bcfb4 | 661 | |
mbed_official | 205:c41fc65bcfb4 | 662 | /* Process unlocked */ |
mbed_official | 205:c41fc65bcfb4 | 663 | __HAL_UNLOCK(htsc); |
mbed_official | 205:c41fc65bcfb4 | 664 | |
mbed_official | 205:c41fc65bcfb4 | 665 | return HAL_OK; |
mbed_official | 205:c41fc65bcfb4 | 666 | } |
mbed_official | 205:c41fc65bcfb4 | 667 | |
mbed_official | 205:c41fc65bcfb4 | 668 | /** |
mbed_official | 205:c41fc65bcfb4 | 669 | * @brief Handles TSC interrupt request |
mbed_official | 205:c41fc65bcfb4 | 670 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 671 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 672 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 673 | */ |
mbed_official | 205:c41fc65bcfb4 | 674 | void HAL_TSC_IRQHandler(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 675 | { |
mbed_official | 205:c41fc65bcfb4 | 676 | /* Check the parameters */ |
mbed_official | 205:c41fc65bcfb4 | 677 | assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance)); |
mbed_official | 205:c41fc65bcfb4 | 678 | |
mbed_official | 205:c41fc65bcfb4 | 679 | /* Check if the end of acquisition occured */ |
mbed_official | 205:c41fc65bcfb4 | 680 | if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_EOA) != RESET) |
mbed_official | 205:c41fc65bcfb4 | 681 | { |
mbed_official | 205:c41fc65bcfb4 | 682 | /* Clear EOA flag */ |
mbed_official | 205:c41fc65bcfb4 | 683 | __HAL_TSC_CLEAR_FLAG(htsc, TSC_FLAG_EOA); |
mbed_official | 205:c41fc65bcfb4 | 684 | } |
mbed_official | 205:c41fc65bcfb4 | 685 | |
mbed_official | 205:c41fc65bcfb4 | 686 | /* Check if max count error occured */ |
mbed_official | 205:c41fc65bcfb4 | 687 | if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_MCE) != RESET) |
mbed_official | 205:c41fc65bcfb4 | 688 | { |
mbed_official | 205:c41fc65bcfb4 | 689 | /* Clear MCE flag */ |
mbed_official | 205:c41fc65bcfb4 | 690 | __HAL_TSC_CLEAR_FLAG(htsc, TSC_FLAG_MCE); |
mbed_official | 205:c41fc65bcfb4 | 691 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 692 | htsc->State = HAL_TSC_STATE_ERROR; |
mbed_official | 205:c41fc65bcfb4 | 693 | /* Conversion completed callback */ |
mbed_official | 205:c41fc65bcfb4 | 694 | HAL_TSC_ErrorCallback(htsc); |
mbed_official | 205:c41fc65bcfb4 | 695 | } |
mbed_official | 205:c41fc65bcfb4 | 696 | else |
mbed_official | 205:c41fc65bcfb4 | 697 | { |
mbed_official | 205:c41fc65bcfb4 | 698 | /* Change TSC state */ |
mbed_official | 205:c41fc65bcfb4 | 699 | htsc->State = HAL_TSC_STATE_READY; |
mbed_official | 205:c41fc65bcfb4 | 700 | /* Conversion completed callback */ |
mbed_official | 205:c41fc65bcfb4 | 701 | HAL_TSC_ConvCpltCallback(htsc); |
mbed_official | 205:c41fc65bcfb4 | 702 | } |
mbed_official | 205:c41fc65bcfb4 | 703 | } |
mbed_official | 205:c41fc65bcfb4 | 704 | |
mbed_official | 205:c41fc65bcfb4 | 705 | /** |
mbed_official | 205:c41fc65bcfb4 | 706 | * @} |
mbed_official | 205:c41fc65bcfb4 | 707 | */ |
mbed_official | 205:c41fc65bcfb4 | 708 | |
mbed_official | 205:c41fc65bcfb4 | 709 | /** |
mbed_official | 205:c41fc65bcfb4 | 710 | * @brief Acquisition completed callback in non blocking mode |
mbed_official | 205:c41fc65bcfb4 | 711 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 712 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 713 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 714 | */ |
mbed_official | 205:c41fc65bcfb4 | 715 | __weak void HAL_TSC_ConvCpltCallback(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 716 | { |
mbed_official | 205:c41fc65bcfb4 | 717 | /* NOTE : This function should not be modified, when the callback is needed, |
mbed_official | 205:c41fc65bcfb4 | 718 | the HAL_TSC_ConvCpltCallback could be implemented in the user file. |
mbed_official | 205:c41fc65bcfb4 | 719 | */ |
mbed_official | 205:c41fc65bcfb4 | 720 | } |
mbed_official | 205:c41fc65bcfb4 | 721 | |
mbed_official | 205:c41fc65bcfb4 | 722 | /** |
mbed_official | 205:c41fc65bcfb4 | 723 | * @brief Error callback in non blocking mode |
mbed_official | 205:c41fc65bcfb4 | 724 | * @param htsc: pointer to a TSC_HandleTypeDef structure that contains |
mbed_official | 205:c41fc65bcfb4 | 725 | * the configuration information for the specified TSC. |
mbed_official | 205:c41fc65bcfb4 | 726 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 727 | */ |
mbed_official | 205:c41fc65bcfb4 | 728 | __weak void HAL_TSC_ErrorCallback(TSC_HandleTypeDef* htsc) |
mbed_official | 205:c41fc65bcfb4 | 729 | { |
mbed_official | 205:c41fc65bcfb4 | 730 | /* NOTE : This function should not be modified, when the callback is needed, |
mbed_official | 205:c41fc65bcfb4 | 731 | the HAL_TSC_ErrorCallback could be implemented in the user file. |
mbed_official | 205:c41fc65bcfb4 | 732 | */ |
mbed_official | 205:c41fc65bcfb4 | 733 | } |
mbed_official | 205:c41fc65bcfb4 | 734 | |
mbed_official | 205:c41fc65bcfb4 | 735 | /** |
mbed_official | 205:c41fc65bcfb4 | 736 | * @brief Utility function used to set the acquired groups mask |
mbed_official | 205:c41fc65bcfb4 | 737 | * @param iomask: Channels IOs mask |
mbed_official | 205:c41fc65bcfb4 | 738 | * @retval Acquired groups mask |
mbed_official | 205:c41fc65bcfb4 | 739 | */ |
mbed_official | 205:c41fc65bcfb4 | 740 | static uint32_t TSC_extract_groups(uint32_t iomask) |
mbed_official | 205:c41fc65bcfb4 | 741 | { |
mbed_official | 205:c41fc65bcfb4 | 742 | uint32_t groups = 0; |
mbed_official | 205:c41fc65bcfb4 | 743 | uint32_t idx; |
mbed_official | 205:c41fc65bcfb4 | 744 | |
mbed_official | 205:c41fc65bcfb4 | 745 | for (idx = 0; idx < TSC_NB_OF_GROUPS; idx++) |
mbed_official | 205:c41fc65bcfb4 | 746 | { |
mbed_official | 205:c41fc65bcfb4 | 747 | if ((iomask & ((uint32_t)0x0F << (idx * 4))) != RESET) |
mbed_official | 205:c41fc65bcfb4 | 748 | { |
mbed_official | 205:c41fc65bcfb4 | 749 | groups |= ((uint32_t)1 << idx); |
mbed_official | 205:c41fc65bcfb4 | 750 | } |
mbed_official | 205:c41fc65bcfb4 | 751 | } |
mbed_official | 205:c41fc65bcfb4 | 752 | |
mbed_official | 205:c41fc65bcfb4 | 753 | return groups; |
mbed_official | 205:c41fc65bcfb4 | 754 | } |
mbed_official | 205:c41fc65bcfb4 | 755 | |
mbed_official | 205:c41fc65bcfb4 | 756 | /** |
mbed_official | 205:c41fc65bcfb4 | 757 | * @} |
mbed_official | 205:c41fc65bcfb4 | 758 | */ |
mbed_official | 205:c41fc65bcfb4 | 759 | |
mbed_official | 205:c41fc65bcfb4 | 760 | #endif /* defined(STM32F051x8) || defined(STM32F071xB) || */ |
mbed_official | 205:c41fc65bcfb4 | 761 | /* defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || */ |
mbed_official | 205:c41fc65bcfb4 | 762 | /* defined(STM32F058xx) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 763 | |
mbed_official | 205:c41fc65bcfb4 | 764 | #endif /* HAL_TSC_MODULE_ENABLED */ |
mbed_official | 205:c41fc65bcfb4 | 765 | |
mbed_official | 205:c41fc65bcfb4 | 766 | /** |
mbed_official | 205:c41fc65bcfb4 | 767 | * @} |
mbed_official | 205:c41fc65bcfb4 | 768 | */ |
mbed_official | 205:c41fc65bcfb4 | 769 | |
mbed_official | 205:c41fc65bcfb4 | 770 | /** |
mbed_official | 205:c41fc65bcfb4 | 771 | * @} |
mbed_official | 205:c41fc65bcfb4 | 772 | */ |
mbed_official | 205:c41fc65bcfb4 | 773 | |
mbed_official | 205:c41fc65bcfb4 | 774 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |