Skip to content

Commit

Permalink
remove timers 6 and 7
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric committed Feb 1, 2024
1 parent adbc55a commit 2d09173
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/drivers/hardware_specific/stm32/stm32_mcu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void _stopTimers(HardwareTimer **timers_to_stop, int timer_num)

// function finds the appropriate timer source trigger for the master timer index provided
// returns -1 if no trigger source is found
// currently supports the master timers to be from TIM1 to TIM8
// currently supports the master timers to be from TIM1 to TIM4 and TIM8
int _getTriggerSourceRegister(HardwareTimer* timer) {
#if defined(TIM1) && defined(LL_TIM_TS_ITR0)
if (timer->getHandle()->Instance == TIM1) return LL_TIM_TS_ITR0;// return TIM_TS_ITR0;
Expand All @@ -223,14 +223,8 @@ int _getTriggerSourceRegister(HardwareTimer* timer) {
#if defined(TIM5) && defined(LL_TIM_TS_ITR4)
if (timer->getHandle()->Instance == TIM5) return LL_TIM_TS_ITR4;//return TIM_TS_ITR4;
#endif
#if defined(TIM6) && defined(LL_TIM_TS_ITR5)
if (timer->getHandle()->Instance == TIM6) return LL_TIM_TS_ITR5;//return TIM_TS_ITR5;
#endif
#if defined(TIM7) && defined(LL_TIM_TS_ITR6)
if (timer->getHandle()->Instance == TIM7) return LL_TIM_TS_ITR6;//return TIM_TS_ITR6;
#endif
#if defined(TIM8) && defined(LL_TIM_TS_ITR7)
if (timer->getHandle()->Instance == TIM8) return LL_TIM_TS_ITR7;// return TIM_TS_ITR7;
#if defined(TIM8) && defined(LL_TIM_TS_ITR5)
if (timer->getHandle()->Instance == TIM8) return LL_TIM_TS_ITR5;//return TIM_TS_ITR5;
#endif
return -1;
}
Expand Down

0 comments on commit 2d09173

Please sign in to comment.