STM32L4xx_HAL_Driver  1.14.0
Peripheral State and Errors functions

Peripheral State and Errors functions. More...

Functions

HAL_TSC_StateTypeDef HAL_TSC_GetState (TSC_HandleTypeDef *htsc)
 Return the TSC handle state. More...
 

Detailed Description

Peripheral State and Errors functions.

 ===============================================================================
            ##### State and Errors functions #####
 ===============================================================================
    [..]
    This subsection provides functions allowing to
      (+) Get TSC state.

Function Documentation

◆ HAL_TSC_GetState()

HAL_TSC_StateTypeDef HAL_TSC_GetState ( TSC_HandleTypeDef htsc)

Return the TSC handle state.

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

Definition at line 964 of file stm32l4xx_hal_tsc.c.

965 {
966  /* Check the parameters */
967  assert_param(IS_TSC_ALL_INSTANCE(htsc->Instance));
968 
969  if (htsc->State == HAL_TSC_STATE_BUSY)
970  {
971  /* Check end of acquisition flag */
972  if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_EOA) != RESET)
973  {
974  /* Check max count error flag */
975  if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_MCE) != RESET)
976  {
977  /* Change TSC state */
978  htsc->State = HAL_TSC_STATE_ERROR;
979  }
980  else
981  {
982  /* Change TSC state */
983  htsc->State = HAL_TSC_STATE_READY;
984  }
985  }
986  }
987 
988  /* Return TSC state */
989  return htsc->State;
990 }
__IO HAL_TSC_StateTypeDef State
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))