Initialization and Configuration functions.
More...
Initialization and Configuration functions.
===============================================================================
##### Initialization and de-initialization functions #####
===============================================================================
[..] This section provides functions allowing to:
(+) Initialize and configure the TSC.
(+) De-initialize the TSC.
◆ HAL_TSC_DeInit()
Deinitialize the TSC peripheral registers to their default reset values.
- Parameters
-
- Return values
-
Definition at line 350 of file stm32l4xx_hal_tsc.c.
364 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1)
__IO HAL_TSC_StateTypeDef State
void HAL_TSC_MspDeInit(TSC_HandleTypeDef *htsc)
DeInitialize the TSC MSP.
void(* MspDeInitCallback)(struct __TSC_HandleTypeDef *htsc)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_TSC_Init()
Initialize the TSC peripheral according to the specified parameters in the TSC_InitTypeDef structure and initialize the associated handle.
- Parameters
-
- Return values
-
Definition at line 245 of file stm32l4xx_hal_tsc.c.
275 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1) 331 htsc->
Instance->IER &= (~(TSC_IT_EOA | TSC_IT_MCE));
334 htsc->
Instance->ICR = (TSC_FLAG_EOA | TSC_FLAG_MCE);
void HAL_TSC_ErrorCallback(TSC_HandleTypeDef *htsc)
Error callback in non-blocking mode.
__IO HAL_TSC_StateTypeDef State
void HAL_TSC_MspInit(TSC_HandleTypeDef *htsc)
Initialize the TSC MSP.
void HAL_TSC_ConvCpltCallback(TSC_HandleTypeDef *htsc)
Acquisition completed callback in non-blocking mode.
uint32_t SynchroPinPolarity
void(* MspInitCallback)(struct __TSC_HandleTypeDef *htsc)
uint32_t SpreadSpectrumDeviation
void(* ConvCpltCallback)(struct __TSC_HandleTypeDef *htsc)
FunctionalState MaxCountInterrupt
uint32_t CTPulseLowLength
static uint32_t TSC_extract_groups(uint32_t iomask)
Utility function used to set the acquired groups mask.
uint32_t CTPulseHighLength
FunctionalState SpreadSpectrum
uint32_t PulseGeneratorPrescaler
void(* ErrorCallback)(struct __TSC_HandleTypeDef *htsc)
uint32_t SpreadSpectrumPrescaler
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_TSC_MspDeInit()
DeInitialize the TSC MSP.
- Parameters
-
| htsc | Pointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC. |
- Return values
-
Definition at line 409 of file stm32l4xx_hal_tsc.c.
◆ HAL_TSC_MspInit()
Initialize the TSC MSP.
- Parameters
-
| htsc | Pointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC. |
- Return values
-
Definition at line 393 of file stm32l4xx_hal_tsc.c.
◆ HAL_TSC_RegisterCallback()
Register a User TSC Callback To be used instead of the weak predefined callback.
- Parameters
-
| htsc | Pointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC. |
| CallbackID | ID of the callback to be registered This parameter can be one of the following values:
|
| pCallback | pointer to the Callback function |
- Return values
-
Definition at line 434 of file stm32l4xx_hal_tsc.c.
436 HAL_StatusTypeDef status =
HAL_OK;
438 if (pCallback == NULL)
441 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
470 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
491 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
501 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
__IO HAL_TSC_StateTypeDef State
void(* MspInitCallback)(struct __TSC_HandleTypeDef *htsc)
void(* ConvCpltCallback)(struct __TSC_HandleTypeDef *htsc)
void(* MspDeInitCallback)(struct __TSC_HandleTypeDef *htsc)
void(* ErrorCallback)(struct __TSC_HandleTypeDef *htsc)
◆ HAL_TSC_UnRegisterCallback()
Unregister an TSC Callback TSC callback is redirected to the weak predefined callback.
- Parameters
-
| htsc | Pointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC. |
| CallbackID | ID of the callback to be unregistered This parameter can be one of the following values: This parameter can be one of the following values:
|
- Return values
-
Definition at line 526 of file stm32l4xx_hal_tsc.c.
528 HAL_StatusTypeDef status =
HAL_OK;
555 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
576 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
586 htsc->
ErrorCode |= HAL_TSC_ERROR_INVALID_CALLBACK;
void HAL_TSC_ErrorCallback(TSC_HandleTypeDef *htsc)
Error callback in non-blocking mode.
__IO HAL_TSC_StateTypeDef State
void HAL_TSC_MspInit(TSC_HandleTypeDef *htsc)
Initialize the TSC MSP.
void HAL_TSC_ConvCpltCallback(TSC_HandleTypeDef *htsc)
Acquisition completed callback in non-blocking mode.
void(* MspInitCallback)(struct __TSC_HandleTypeDef *htsc)
void(* ConvCpltCallback)(struct __TSC_HandleTypeDef *htsc)
void HAL_TSC_MspDeInit(TSC_HandleTypeDef *htsc)
DeInitialize the TSC MSP.
void(* MspDeInitCallback)(struct __TSC_HandleTypeDef *htsc)
void(* ErrorCallback)(struct __TSC_HandleTypeDef *htsc)