]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_tsc.c
2 ******************************************************************************
3 * @file stm32f3xx_hal_tsc.c
4 * @author MCD Application Team
7 * @brief This file provides firmware functions to manage the following
8 * functionalities of the Touch Sensing Controller (TSC) peripheral:
9 * + Initialization and DeInitialization
10 * + Channel IOs, Shield IOs and Sampling IOs configuration
11 * + Start and Stop an acquisition
12 * + Read acquisition result
13 * + Interrupts and flags management
16 ================================================================================
17 ##### TSC specific features #####
18 ================================================================================
20 (#) Proven and robust surface charge transfer acquisition principle
22 (#) Supports up to 3 capacitive sensing channels per group
24 (#) Capacitive sensing channels can be acquired in parallel offering a very good
27 (#) Spread spectrum feature to improve system robustness in noisy environments
29 (#) Full hardware management of the charge transfer acquisition sequence
31 (#) Programmable charge transfer frequency
33 (#) Programmable sampling capacitor I/O pin
35 (#) Programmable channel I/O pin
37 (#) Programmable max count value to avoid long acquisition when a channel is faulty
39 (#) Dedicated end of acquisition and max count error flags with interrupt capability
41 (#) One sampling capacitor for up to 3 capacitive sensing channels to reduce the system
44 (#) Compatible with proximity, touchkey, linear and rotary touch sensor implementation
47 ##### How to use this driver #####
48 ================================================================================
50 (#) Enable the TSC interface clock using __TSC_CLK_ENABLE() macro.
52 (#) GPIO pins configuration
53 (++) Enable the clock for the TSC GPIOs using __GPIOx_CLK_ENABLE() macro.
54 (++) Configure the TSC pins used as sampling IOs in alternate function output Open-Drain mode,
55 and TSC pins used as channel/shield IOs in alternate function output Push-Pull mode
56 using HAL_GPIO_Init() function.
57 (++) Configure the alternate function on all the TSC pins using HAL_xxxx() function.
59 (#) Interrupts configuration
60 (++) Configure the NVIC (if the interrupt model is used) using HAL_xxx() function.
63 (++) Configure all TSC parameters and used TSC IOs using HAL_TSC_Init() function.
65 *** Acquisition sequence ***
66 ===================================
68 (+) Discharge all IOs using HAL_TSC_IODischarge() function.
69 (+) Wait a certain time allowing a good discharge of all capacitors. This delay depends
70 of the sampling capacitor and electrodes design.
71 (+) Select the channel IOs to be acquired using HAL_TSC_IOConfig() function.
72 (+) Launch the acquisition using either HAL_TSC_Start() or HAL_TSC_Start_IT() function.
73 If the synchronized mode is selected, the acquisition will start as soon as the signal
74 is received on the synchro pin.
75 (+) Wait the end of acquisition using either HAL_TSC_PollForAcquisition() or
76 HAL_TSC_GetState() function or using WFI instruction for example.
77 (+) Check the group acquisition status using HAL_TSC_GroupGetStatus() function.
78 (+) Read the acquisition value using HAL_TSC_GroupGetValue() function.
81 ******************************************************************************
84 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
86 * Redistribution and use in source and binary forms, with or without modification,
87 * are permitted provided that the following conditions are met:
88 * 1. Redistributions of source code must retain the above copyright notice,
89 * this list of conditions and the following disclaimer.
90 * 2. Redistributions in binary form must reproduce the above copyright notice,
91 * this list of conditions and the following disclaimer in the documentation
92 * and/or other materials provided with the distribution.
93 * 3. Neither the name of STMicroelectronics nor the names of its contributors
94 * may be used to endorse or promote products derived from this software
95 * without specific prior written permission.
97 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
98 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
99 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
100 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
101 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
102 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
103 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
104 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
105 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
106 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
108 ******************************************************************************
111 /* Includes ------------------------------------------------------------------*/
112 #include "stm32f3xx_hal.h"
114 /** @addtogroup STM32F3xx_HAL_Driver
118 /** @defgroup TSC HAL TSC module driver
119 * @brief HAL TSC module driver
123 #ifdef HAL_TSC_MODULE_ENABLED
125 /* Private typedef -----------------------------------------------------------*/
126 /* Private define ------------------------------------------------------------*/
127 /* Private macro -------------------------------------------------------------*/
128 /* Private variables ---------------------------------------------------------*/
129 /* Private function prototypes -----------------------------------------------*/
130 static uint32_t TSC_extract_groups(uint32_t iomask
);
131 /* Exported functions ---------------------------------------------------------*/
133 /** @defgroup TSC_Exported_Functions TSC Exported Functions
137 /** @defgroup TSC_Exported_Functions_Group1 Initialization and de-initialization functions
138 * @brief Initialization and Configuration functions
141 ===============================================================================
142 ##### Initialization and de-initialization functions #####
143 ===============================================================================
144 [..] This section provides functions allowing to:
145 (+) Initialize and configure the TSC.
146 (+) De-initialize the TSC.
152 * @brief Initializes the TSC peripheral according to the specified parameters
153 * in the TSC_InitTypeDef structure.
154 * @param htsc: TSC handle
157 HAL_StatusTypeDef
HAL_TSC_Init(TSC_HandleTypeDef
* htsc
)
159 /* Check TSC handle allocation */
160 if (htsc
== HAL_NULL
)
165 /* Check the parameters */
166 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
167 assert_param(IS_TSC_CTPH(htsc
->Init
.CTPulseHighLength
));
168 assert_param(IS_TSC_CTPL(htsc
->Init
.CTPulseLowLength
));
169 assert_param(IS_TSC_SS(htsc
->Init
.SpreadSpectrum
));
170 assert_param(IS_TSC_SSD(htsc
->Init
.SpreadSpectrumDeviation
));
171 assert_param(IS_TSC_SS_PRESC(htsc
->Init
.SpreadSpectrumPrescaler
));
172 assert_param(IS_TSC_PG_PRESC(htsc
->Init
.PulseGeneratorPrescaler
));
173 assert_param(IS_TSC_MCV(htsc
->Init
.MaxCountValue
));
174 assert_param(IS_TSC_IODEF(htsc
->Init
.IODefaultMode
));
175 assert_param(IS_TSC_SYNC_POL(htsc
->Init
.SynchroPinPolarity
));
176 assert_param(IS_TSC_ACQ_MODE(htsc
->Init
.AcquisitionMode
));
177 assert_param(IS_TSC_MCE_IT(htsc
->Init
.MaxCountInterrupt
));
179 /* Initialize the TSC state */
180 htsc
->State
= HAL_TSC_STATE_BUSY
;
182 /* Init the low level hardware : GPIO, CLOCK, CORTEX */
183 HAL_TSC_MspInit(htsc
);
185 /*--------------------------------------------------------------------------*/
186 /* Set TSC parameters */
189 htsc
->Instance
->CR
= TSC_CR_TSCE
;
191 /* Set all functions */
192 htsc
->Instance
->CR
|= (htsc
->Init
.CTPulseHighLength
|
193 htsc
->Init
.CTPulseLowLength
|
194 (uint32_t)(htsc
->Init
.SpreadSpectrumDeviation
<< 17) |
195 htsc
->Init
.SpreadSpectrumPrescaler
|
196 htsc
->Init
.PulseGeneratorPrescaler
|
197 htsc
->Init
.MaxCountValue
|
198 htsc
->Init
.IODefaultMode
|
199 htsc
->Init
.SynchroPinPolarity
|
200 htsc
->Init
.AcquisitionMode
);
202 /* Spread spectrum */
203 if (htsc
->Init
.SpreadSpectrum
== ENABLE
)
205 htsc
->Instance
->CR
|= TSC_CR_SSE
;
208 /* Disable Schmitt trigger hysteresis on all used TSC IOs */
209 htsc
->Instance
->IOHCR
= (uint32_t)(~(htsc
->Init
.ChannelIOs
| htsc
->Init
.ShieldIOs
| htsc
->Init
.SamplingIOs
));
211 /* Set channel and shield IOs */
212 htsc
->Instance
->IOCCR
= (htsc
->Init
.ChannelIOs
| htsc
->Init
.ShieldIOs
);
214 /* Set sampling IOs */
215 htsc
->Instance
->IOSCR
= htsc
->Init
.SamplingIOs
;
217 /* Set the groups to be acquired */
218 htsc
->Instance
->IOGCSR
= TSC_extract_groups(htsc
->Init
.ChannelIOs
);
220 /* Disable interrupts */
221 htsc
->Instance
->IER
&= (uint32_t)(~(TSC_IT_EOA
| TSC_IT_MCE
));
224 htsc
->Instance
->ICR
= (TSC_FLAG_EOA
| TSC_FLAG_MCE
);
226 /*--------------------------------------------------------------------------*/
228 /* Initialize the TSC state */
229 htsc
->State
= HAL_TSC_STATE_READY
;
231 /* Return function status */
236 * @brief Deinitializes the TSC peripheral registers to their default reset values.
237 * @param htsc: TSC handle
240 HAL_StatusTypeDef
HAL_TSC_DeInit(TSC_HandleTypeDef
* htsc
)
242 /* Check TSC handle allocation */
243 if (htsc
== HAL_NULL
)
248 /* Check the parameters */
249 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
251 /* Change TSC state */
252 htsc
->State
= HAL_TSC_STATE_BUSY
;
254 /* DeInit the low level hardware */
255 HAL_TSC_MspDeInit(htsc
);
257 /* Change TSC state */
258 htsc
->State
= HAL_TSC_STATE_RESET
;
260 /* Process unlocked */
263 /* Return function status */
268 * @brief Initializes the TSC MSP.
269 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
270 * the configuration information for the specified TSC.
273 __weak
void HAL_TSC_MspInit(TSC_HandleTypeDef
* htsc
)
275 /* NOTE : This function should not be modified, when the callback is needed,
276 the HAL_TSC_MspInit could be implemented in the user file.
281 * @brief DeInitializes the TSC MSP.
282 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
283 * the configuration information for the specified TSC.
286 __weak
void HAL_TSC_MspDeInit(TSC_HandleTypeDef
* htsc
)
288 /* NOTE : This function should not be modified, when the callback is needed,
289 the HAL_TSC_MspDeInit could be implemented in the user file.
297 /** @defgroup TSC_Exported_Functions_Group2 Input and Output operation functions
298 * @brief IO operation functions
301 ===============================================================================
302 ##### I/O Operation functions #####
303 ===============================================================================
304 [..] This section provides functions allowing to:
305 (+) Start acquisition in polling mode.
306 (+) Start acquisition in interrupt mode.
307 (+) Stop conversion in polling mode.
308 (+) Stop conversion in interrupt mode.
309 (+) Get group acquisition status.
310 (+) Get group acquisition value.
316 * @brief Starts the acquisition.
317 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
318 * the configuration information for the specified TSC.
321 HAL_StatusTypeDef
HAL_TSC_Start(TSC_HandleTypeDef
* htsc
)
323 /* Check the parameters */
324 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
329 /* Change TSC state */
330 htsc
->State
= HAL_TSC_STATE_BUSY
;
332 /* Clear interrupts */
333 __HAL_TSC_DISABLE_IT(htsc
, (TSC_IT_EOA
| TSC_IT_MCE
));
336 __HAL_TSC_CLEAR_FLAG(htsc
, (TSC_FLAG_EOA
| TSC_FLAG_MCE
));
338 /* Stop discharging the IOs */
339 __HAL_TSC_SET_IODEF_INFLOAT(htsc
);
341 /* Launch the acquisition */
342 __HAL_TSC_START_ACQ(htsc
);
344 /* Process unlocked */
347 /* Return function status */
352 * @brief Enables the interrupt and starts the acquisition
353 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
354 * the configuration information for the specified TSC.
355 * @retval HAL status.
357 HAL_StatusTypeDef
HAL_TSC_Start_IT(TSC_HandleTypeDef
* htsc
)
359 /* Check the parameters */
360 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
361 assert_param(IS_TSC_MCE_IT(htsc
->Init
.MaxCountInterrupt
));
366 /* Change TSC state */
367 htsc
->State
= HAL_TSC_STATE_BUSY
;
369 /* Enable end of acquisition interrupt */
370 __HAL_TSC_ENABLE_IT(htsc
, TSC_IT_EOA
);
372 /* Enable max count error interrupt (optional) */
373 if (htsc
->Init
.MaxCountInterrupt
== ENABLE
)
375 __HAL_TSC_ENABLE_IT(htsc
, TSC_IT_MCE
);
379 __HAL_TSC_DISABLE_IT(htsc
, TSC_IT_MCE
);
383 __HAL_TSC_CLEAR_FLAG(htsc
, (TSC_FLAG_EOA
| TSC_FLAG_MCE
));
385 /* Stop discharging the IOs */
386 __HAL_TSC_SET_IODEF_INFLOAT(htsc
);
388 /* Launch the acquisition */
389 __HAL_TSC_START_ACQ(htsc
);
391 /* Process unlocked */
394 /* Return function status */
399 * @brief Stops the acquisition previously launched in polling mode
400 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
401 * the configuration information for the specified TSC.
404 HAL_StatusTypeDef
HAL_TSC_Stop(TSC_HandleTypeDef
* htsc
)
406 /* Check the parameters */
407 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
412 /* Stop the acquisition */
413 __HAL_TSC_STOP_ACQ(htsc
);
416 __HAL_TSC_CLEAR_FLAG(htsc
, (TSC_FLAG_EOA
| TSC_FLAG_MCE
));
418 /* Change TSC state */
419 htsc
->State
= HAL_TSC_STATE_READY
;
421 /* Process unlocked */
424 /* Return function status */
429 * @brief Stops the acquisition previously launched in interrupt mode
430 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
431 * the configuration information for the specified TSC.
434 HAL_StatusTypeDef
HAL_TSC_Stop_IT(TSC_HandleTypeDef
* htsc
)
436 /* Check the parameters */
437 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
442 /* Stop the acquisition */
443 __HAL_TSC_STOP_ACQ(htsc
);
445 /* Disable interrupts */
446 __HAL_TSC_DISABLE_IT(htsc
, (TSC_IT_EOA
| TSC_IT_MCE
));
449 __HAL_TSC_CLEAR_FLAG(htsc
, (TSC_FLAG_EOA
| TSC_FLAG_MCE
));
451 /* Change TSC state */
452 htsc
->State
= HAL_TSC_STATE_READY
;
454 /* Process unlocked */
457 /* Return function status */
462 * @brief Gets the acquisition status for a group
463 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
464 * the configuration information for the specified TSC.
465 * @param gx_index: Index of the group
466 * @retval Group status
468 TSC_GroupStatusTypeDef
HAL_TSC_GroupGetStatus(TSC_HandleTypeDef
* htsc
, uint32_t gx_index
)
470 /* Check the parameters */
471 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
472 assert_param(IS_GROUP_INDEX(gx_index
));
474 /* Return the group status */
475 return(__HAL_TSC_GET_GROUP_STATUS(htsc
, gx_index
));
479 * @brief Gets the acquisition measure for a group
480 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
481 * the configuration information for the specified TSC.
482 * @param gx_index: Index of the group
483 * @retval Acquisition measure
485 uint32_t HAL_TSC_GroupGetValue(TSC_HandleTypeDef
* htsc
, uint32_t gx_index
)
487 /* Check the parameters */
488 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
489 assert_param(IS_GROUP_INDEX(gx_index
));
491 /* Return the group acquisition counter */
492 return htsc
->Instance
->IOGXCR
[gx_index
];
499 /** @defgroup TSC_Exported_Functions_Group3 Peripheral Control functions
500 * @brief Peripheral Control functions
503 ===============================================================================
504 ##### Peripheral Control functions #####
505 ===============================================================================
506 [..] This section provides functions allowing to:
507 (+) Configure TSC IOs
508 (+) Discharge TSC IOs
514 * @brief Configures TSC IOs
515 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
516 * the configuration information for the specified TSC.
517 * @param config: pointer to the configuration structure.
520 HAL_StatusTypeDef
HAL_TSC_IOConfig(TSC_HandleTypeDef
* htsc
, TSC_IOConfigTypeDef
* config
)
522 /* Check the parameters */
523 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
528 /* Stop acquisition */
529 __HAL_TSC_STOP_ACQ(htsc
);
531 /* Disable Schmitt trigger hysteresis on all used TSC IOs */
532 htsc
->Instance
->IOHCR
= (uint32_t)(~(config
->ChannelIOs
| config
->ShieldIOs
| config
->SamplingIOs
));
534 /* Set channel and shield IOs */
535 htsc
->Instance
->IOCCR
= (config
->ChannelIOs
| config
->ShieldIOs
);
537 /* Set sampling IOs */
538 htsc
->Instance
->IOSCR
= config
->SamplingIOs
;
540 /* Set groups to be acquired */
541 htsc
->Instance
->IOGCSR
= TSC_extract_groups(config
->ChannelIOs
);
543 /* Process unlocked */
546 /* Return function status */
551 * @brief Discharge TSC IOs
552 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
553 * the configuration information for the specified TSC.
554 * @param choice: enable or disable
557 HAL_StatusTypeDef
HAL_TSC_IODischarge(TSC_HandleTypeDef
* htsc
, uint32_t choice
)
559 /* Check the parameters */
560 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
565 if (choice
== ENABLE
)
567 __HAL_TSC_SET_IODEF_OUTPPLOW(htsc
);
571 __HAL_TSC_SET_IODEF_INFLOAT(htsc
);
574 /* Process unlocked */
577 /* Return the group acquisition counter */
585 /** @defgroup TSC_Exported_Functions_Group4 Peripheral State functions
586 * @brief State functions
589 ===============================================================================
590 ##### State functions #####
591 ===============================================================================
593 This subsection provides functions allowing to
595 (+) Poll for acquisition completed.
596 (+) Handles TSC interrupt request.
603 * @brief Return the TSC state
604 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
605 * the configuration information for the specified TSC.
608 HAL_TSC_StateTypeDef
HAL_TSC_GetState(TSC_HandleTypeDef
* htsc
)
610 /* Check the parameters */
611 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
613 if (htsc
->State
== HAL_TSC_STATE_BUSY
)
615 /* Check end of acquisition flag */
616 if (__HAL_TSC_GET_FLAG(htsc
, TSC_FLAG_EOA
) != RESET
)
618 /* Check max count error flag */
619 if (__HAL_TSC_GET_FLAG(htsc
, TSC_FLAG_MCE
) != RESET
)
621 /* Change TSC state */
622 htsc
->State
= HAL_TSC_STATE_ERROR
;
626 /* Change TSC state */
627 htsc
->State
= HAL_TSC_STATE_READY
;
632 /* Return TSC state */
637 * @brief Start acquisition and wait until completion
638 * @note There is no need of a timeout parameter as the max count error is already
639 * managed by the TSC peripheral.
640 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
641 * the configuration information for the specified TSC.
644 HAL_StatusTypeDef
HAL_TSC_PollForAcquisition(TSC_HandleTypeDef
* htsc
)
646 /* Check the parameters */
647 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
652 /* Check end of acquisition */
653 while (HAL_TSC_GetState(htsc
) == HAL_TSC_STATE_BUSY
)
655 /* The timeout (max count error) is managed by the TSC peripheral itself. */
658 /* Process unlocked */
665 * @brief Handles TSC interrupt request
666 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
667 * the configuration information for the specified TSC.
670 void HAL_TSC_IRQHandler(TSC_HandleTypeDef
* htsc
)
672 /* Check the parameters */
673 assert_param(IS_TSC_ALL_INSTANCE(htsc
->Instance
));
675 /* Check if the end of acquisition occured */
676 if (__HAL_TSC_GET_FLAG(htsc
, TSC_FLAG_EOA
) != RESET
)
679 __HAL_TSC_CLEAR_FLAG(htsc
, TSC_FLAG_EOA
);
682 /* Check if max count error occured */
683 if (__HAL_TSC_GET_FLAG(htsc
, TSC_FLAG_MCE
) != RESET
)
686 __HAL_TSC_CLEAR_FLAG(htsc
, TSC_FLAG_MCE
);
687 /* Change TSC state */
688 htsc
->State
= HAL_TSC_STATE_ERROR
;
689 /* Conversion completed callback */
690 HAL_TSC_ErrorCallback(htsc
);
694 /* Change TSC state */
695 htsc
->State
= HAL_TSC_STATE_READY
;
696 /* Conversion completed callback */
697 HAL_TSC_ConvCpltCallback(htsc
);
706 * @brief Acquisition completed callback in non blocking mode
707 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
708 * the configuration information for the specified TSC.
711 __weak
void HAL_TSC_ConvCpltCallback(TSC_HandleTypeDef
* htsc
)
713 /* NOTE : This function should not be modified, when the callback is needed,
714 the HAL_TSC_ConvCpltCallback could be implemented in the user file.
719 * @brief Error callback in non blocking mode
720 * @param htsc: pointer to a TSC_HandleTypeDef structure that contains
721 * the configuration information for the specified TSC.
724 __weak
void HAL_TSC_ErrorCallback(TSC_HandleTypeDef
* htsc
)
726 /* NOTE : This function should not be modified, when the callback is needed,
727 the HAL_TSC_ErrorCallback could be implemented in the user file.
732 * @brief Utility function used to set the acquired groups mask
733 * @param iomask: Channels IOs mask
734 * @retval Acquired groups mask
736 static uint32_t TSC_extract_groups(uint32_t iomask
)
741 for (idx
= 0; idx
< TSC_NB_OF_GROUPS
; idx
++)
743 if ((iomask
& ((uint32_t)0x0F << (idx
* 4))) != RESET
)
745 groups
|= ((uint32_t)1 << idx
);
756 #endif /* HAL_TSC_MODULE_ENABLED */
766 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/