STM32L4xx_HAL_Driver  1.14.0
IRQ Handler and Callbacks

Functions

void HAL_TSC_IRQHandler (TSC_HandleTypeDef *htsc)
 Handle TSC interrupt request. More...
 
void HAL_TSC_ConvCpltCallback (TSC_HandleTypeDef *htsc)
 Acquisition completed callback in non-blocking mode. More...
 
void HAL_TSC_ErrorCallback (TSC_HandleTypeDef *htsc)
 Error callback in non-blocking mode. More...
 

Detailed Description

Function Documentation

◆ HAL_TSC_ConvCpltCallback()

__weak void HAL_TSC_ConvCpltCallback ( TSC_HandleTypeDef htsc)

Acquisition completed callback in non-blocking mode.

Parameters
htscPointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC.
Return values
None

Definition at line 1051 of file stm32l4xx_hal_tsc.c.

1052 {
1053  /* Prevent unused argument(s) compilation warning */
1054  UNUSED(htsc);
1055 
1056  /* NOTE : This function should not be modified, when the callback is needed,
1057  the HAL_TSC_ConvCpltCallback could be implemented in the user file.
1058  */
1059 }

◆ HAL_TSC_ErrorCallback()

__weak void HAL_TSC_ErrorCallback ( TSC_HandleTypeDef htsc)

Error callback in non-blocking mode.

Parameters
htscPointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC.
Return values
None

Definition at line 1067 of file stm32l4xx_hal_tsc.c.

1068 {
1069  /* Prevent unused argument(s) compilation warning */
1070  UNUSED(htsc);
1071 
1072  /* NOTE : This function should not be modified, when the callback is needed,
1073  the HAL_TSC_ErrorCallback could be implemented in the user file.
1074  */
1075 }

◆ HAL_TSC_IRQHandler()

void HAL_TSC_IRQHandler ( TSC_HandleTypeDef htsc)

Handle TSC interrupt request.

Parameters
htscPointer to a TSC_HandleTypeDef structure that contains the configuration information for the specified TSC.
Return values
None

Definition at line 1006 of file stm32l4xx_hal_tsc.c.

1007 {
1008  /* Check the parameters */
1009  assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance));
1010 
1011  /* Check if the end of acquisition occurred */
1012  if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_EOA) != RESET)
1013  {
1014  /* Clear EOA flag */
1015  __HAL_TSC_CLEAR_FLAG(htsc, TSC_FLAG_EOA);
1016  }
1017 
1018  /* Check if max count error occurred */
1019  if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_MCE) != RESET)
1020  {
1021  /* Clear MCE flag */
1022  __HAL_TSC_CLEAR_FLAG(htsc, TSC_FLAG_MCE);
1023  /* Change TSC state */
1024  htsc->State = HAL_TSC_STATE_ERROR;
1025 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1)
1026  htsc->ErrorCallback(htsc);
1027 #else
1028  /* Conversion completed callback */
1029  HAL_TSC_ErrorCallback(htsc);
1030 #endif /* USE_HAL_TSC_REGISTER_CALLBACKS */
1031  }
1032  else
1033  {
1034  /* Change TSC state */
1035  htsc->State = HAL_TSC_STATE_READY;
1036 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1)
1037  htsc->ConvCpltCallback(htsc);
1038 #else
1039  /* Conversion completed callback */
1041 #endif /* USE_HAL_TSC_REGISTER_CALLBACKS */
1042  }
1043 }
void HAL_TSC_ErrorCallback(TSC_HandleTypeDef *htsc)
Error callback in non-blocking mode.
__IO HAL_TSC_StateTypeDef State
void HAL_TSC_ConvCpltCallback(TSC_HandleTypeDef *htsc)
Acquisition completed callback in non-blocking mode.
void(* ConvCpltCallback)(struct __TSC_HandleTypeDef *htsc)
void(* ErrorCallback)(struct __TSC_HandleTypeDef *htsc)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))