210 #ifdef HAL_TSC_MODULE_ENABLED 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);
364 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1) 419 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1) 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;
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;
640 __HAL_TSC_DISABLE_IT(htsc, (TSC_IT_EOA | TSC_IT_MCE));
643 __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE));
648 __HAL_TSC_SET_IODEF_OUTPPLOW(htsc);
652 __HAL_TSC_SET_IODEF_INFLOAT(htsc);
656 __HAL_TSC_START_ACQ(htsc);
684 __HAL_TSC_ENABLE_IT(htsc, TSC_IT_EOA);
689 __HAL_TSC_ENABLE_IT(htsc, TSC_IT_MCE);
693 __HAL_TSC_DISABLE_IT(htsc, TSC_IT_MCE);
697 __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE));
702 __HAL_TSC_SET_IODEF_OUTPPLOW(htsc);
706 __HAL_TSC_SET_IODEF_INFLOAT(htsc);
710 __HAL_TSC_START_ACQ(htsc);
734 __HAL_TSC_STOP_ACQ(htsc);
737 __HAL_TSC_SET_IODEF_OUTPPLOW(htsc);
740 __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE));
767 __HAL_TSC_STOP_ACQ(htsc);
770 __HAL_TSC_SET_IODEF_OUTPPLOW(htsc);
773 __HAL_TSC_DISABLE_IT(htsc, (TSC_IT_EOA | TSC_IT_MCE));
776 __HAL_TSC_CLEAR_FLAG(htsc, (TSC_FLAG_EOA | TSC_FLAG_MCE));
830 return (__HAL_TSC_GET_GROUP_STATUS(htsc, gx_index));
847 return htsc->
Instance->IOGXCR[gx_index];
887 __HAL_TSC_STOP_ACQ(htsc);
923 if (choice == ENABLE)
925 __HAL_TSC_SET_IODEF_OUTPPLOW(htsc);
929 __HAL_TSC_SET_IODEF_INFLOAT(htsc);
972 if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_EOA) != RESET)
975 if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_MCE) != RESET)
1012 if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_EOA) != RESET)
1015 __HAL_TSC_CLEAR_FLAG(htsc, TSC_FLAG_EOA);
1019 if (__HAL_TSC_GET_FLAG(htsc, TSC_FLAG_MCE) != RESET)
1022 __HAL_TSC_CLEAR_FLAG(htsc, TSC_FLAG_MCE);
1025 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1) 1036 #if (USE_HAL_TSC_REGISTER_CALLBACKS == 1) 1097 uint32_t groups = 0UL;
1102 if ((iomask & (0x0FUL << (idx * 4UL))) != 0UL )
1104 groups |= (1UL << idx);
HAL_StatusTypeDef HAL_TSC_IODischarge(TSC_HandleTypeDef *htsc, FunctionalState choice)
Discharge TSC IOs.
HAL_StatusTypeDef HAL_TSC_DeInit(TSC_HandleTypeDef *htsc)
Deinitialize the TSC peripheral registers to their default reset values.
void HAL_TSC_ErrorCallback(TSC_HandleTypeDef *htsc)
Error callback in non-blocking mode.
HAL_StatusTypeDef HAL_TSC_IOConfig(TSC_HandleTypeDef *htsc, TSC_IOConfigTypeDef *config)
Configure TSC IOs.
TSC IOs configuration structure definition.
This file contains all the functions prototypes for the HAL module driver.
HAL_StatusTypeDef HAL_TSC_Stop_IT(TSC_HandleTypeDef *htsc)
Stop the acquisition previously launched in interrupt 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
HAL_StatusTypeDef HAL_TSC_Start(TSC_HandleTypeDef *htsc)
Start the acquisition.
void(* MspInitCallback)(struct __TSC_HandleTypeDef *htsc)
HAL_TSC_StateTypeDef HAL_TSC_GetState(TSC_HandleTypeDef *htsc)
Return the TSC handle state.
TSC_GroupStatusTypeDef HAL_TSC_GroupGetStatus(TSC_HandleTypeDef *htsc, uint32_t gx_index)
Get the acquisition status for a group.
uint32_t SpreadSpectrumDeviation
HAL_TSC_CallbackIDTypeDef
HAL TSC Callback ID enumeration definition.
void HAL_TSC_IRQHandler(TSC_HandleTypeDef *htsc)
Handle TSC interrupt request.
uint32_t HAL_TSC_GroupGetValue(TSC_HandleTypeDef *htsc, uint32_t gx_index)
Get the acquisition measure for a group.
void(* ConvCpltCallback)(struct __TSC_HandleTypeDef *htsc)
FunctionalState MaxCountInterrupt
void HAL_TSC_MspDeInit(TSC_HandleTypeDef *htsc)
DeInitialize the TSC MSP.
TSC handle Structure definition.
void(* pTSC_CallbackTypeDef)(TSC_HandleTypeDef *htsc)
HAL TSC Callback pointer definition.
uint32_t CTPulseLowLength
HAL_StatusTypeDef HAL_TSC_PollForAcquisition(TSC_HandleTypeDef *htsc)
Start acquisition and wait until completion.
static uint32_t TSC_extract_groups(uint32_t iomask)
Utility function used to set the acquired groups mask.
uint32_t CTPulseHighLength
HAL_StatusTypeDef HAL_TSC_Stop(TSC_HandleTypeDef *htsc)
Stop the acquisition previously launched in polling mode.
FunctionalState SpreadSpectrum
HAL_TSC_StateTypeDef
TSC state structure definition.
void(* MspDeInitCallback)(struct __TSC_HandleTypeDef *htsc)
HAL_StatusTypeDef HAL_TSC_RegisterCallback(TSC_HandleTypeDef *htsc, HAL_TSC_CallbackIDTypeDef CallbackID, pTSC_CallbackTypeDef pCallback)
Register a User TSC Callback To be used instead of the weak predefined callback.
HAL_StatusTypeDef HAL_TSC_Init(TSC_HandleTypeDef *htsc)
Initialize the TSC peripheral according to the specified parameters in the TSC_InitTypeDef structure ...
uint32_t PulseGeneratorPrescaler
HAL_StatusTypeDef HAL_TSC_UnRegisterCallback(TSC_HandleTypeDef *htsc, HAL_TSC_CallbackIDTypeDef CallbackID)
Unregister an TSC Callback TSC callback is redirected to the weak predefined callback.
TSC_GroupStatusTypeDef
TSC group status structure definition.
HAL_StatusTypeDef HAL_TSC_Start_IT(TSC_HandleTypeDef *htsc)
Start the acquisition in interrupt mode.
void(* ErrorCallback)(struct __TSC_HandleTypeDef *htsc)
uint32_t SpreadSpectrumPrescaler
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))