__HAL_TIM_IS_TIM_COUNTING_DOWN macro
Indicates whether or not the TIM Counter is used as downcounter.
Syntax
#define __HAL_TIM_IS_TIM_COUNTING_DOWN(__HANDLE__) (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR))
Return value
False (Counter used as upcounter) or True (Counter used as downcounter)
Notes
This macro is particularly useful to get the counting mode when the timer operates in Center-aligned mode or Encoder mode.
Examples
__HAL_TIM_IS_TIM_COUNTING_DOWN is referenced by 3 libraries and example projects: