HT32SX Monarch Scan
Monarch Scan application for HT32SX
SDK EVAL Timers Exported Macros

Macros

#define SdkEvalTimersTimConfig_ms(TIM_HANDLER_P, TIME)
 Configures the specified TIMER to raise an interrupt every TIME ms. More...
 
#define SdkEvalTimersState(TIM_HANDLER_P, NEWSTATE)   {((uint8_t)NEWSTATE)?(HAL_TIM_Base_Start_IT(TIM_HANDLER_P)):(HAL_TIM_Base_Stop_IT(TIM_HANDLER_P));}
 Enables or Disables a specific Timer with its IRQ. More...
 
#define SdkEvalTimersSetCounter(TIM_HANDLER_P, VALUE)   {__HAL_TIM_SET_COUNTER(TIM_HANDLER_P,VALUE);}
 Set the counter of the specified TIMER. More...
 
#define SdkEvalTimersGetCounter(TIM_HANDLER_P)   __HAL_TIM_GET_COUNTER(TIM_HANDLER_P)
 Get the counter of the specified TIMER. More...
 
#define SdkEvalTimersResetCounter(TIM_HANDLER_P)   {__HAL_TIM_SET_COUNTER(TIM_HANDLER_P,0);}
 Resets the counter of a specific timer. More...
 

Detailed Description

Macro Definition Documentation

◆ SdkEvalTimersGetCounter

#define SdkEvalTimersGetCounter (   TIM_HANDLER_P)    __HAL_TIM_GET_COUNTER(TIM_HANDLER_P)

Get the counter of the specified TIMER.

Parameters
TIMERtimer to be set. This parameter can be a pointer to TIM_TypeDef
Return values
None

◆ SdkEvalTimersResetCounter

#define SdkEvalTimersResetCounter (   TIM_HANDLER_P)    {__HAL_TIM_SET_COUNTER(TIM_HANDLER_P,0);}

Resets the counter of a specific timer.

Parameters
TIMERtimer to be reset. This parameter can be a pointer to TIM_TypeDef
Return values
None

◆ SdkEvalTimersSetCounter

#define SdkEvalTimersSetCounter (   TIM_HANDLER_P,
  VALUE 
)    {__HAL_TIM_SET_COUNTER(TIM_HANDLER_P,VALUE);}

Set the counter of the specified TIMER.

Parameters
TIMERtimer to be set. This parameter can be a pointer to TIM_TypeDef
VALUEvalue to set in the counter. This parameter is an uint32_t
Return values
None

◆ SdkEvalTimersState

#define SdkEvalTimersState (   TIM_HANDLER_P,
  NEWSTATE 
)    {((uint8_t)NEWSTATE)?(HAL_TIM_Base_Start_IT(TIM_HANDLER_P)):(HAL_TIM_Base_Stop_IT(TIM_HANDLER_P));}

Enables or Disables a specific Timer with its IRQ.

Parameters
TIMERtimer to be set. This parameter can be a pointer to TIM_TypeDef
NEWSTATEspecifies if a timer has to be enabled or disabled. This parameter is a float.
Return values
None

◆ SdkEvalTimersTimConfig_ms

#define SdkEvalTimersTimConfig_ms (   TIM_HANDLER_P,
  TIME 
)
Value:
{\
uint32_t n = (uint32_t)(TIME*CLOCK_FREQUENCY);\
uint16_t a,b;\
SdkEvalTimersFindFactors(n,&a,&b);\
SdkEvalTimersTimConfig(TIM_HANDLER_P,a-1,b-1);\
}

Configures the specified TIMER to raise an interrupt every TIME ms.

Parameters
TIMERtimer to be set. This parameter can be a pointer to TIM_TypeDef
TIMEtimer duration in ms. This parameter is a float.
Return values
None
CLOCK_FREQUENCY
#define CLOCK_FREQUENCY
MCU XO frequency(in KHz) definition.
Definition: SDK_UTILS_Timers_Config_stm32l0xx.h:87