Skip to content

Commit 2d09173

Browse files
committed
remove timers 6 and 7
1 parent adbc55a commit 2d09173

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/drivers/hardware_specific/stm32/stm32_mcu.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void _stopTimers(HardwareTimer **timers_to_stop, int timer_num)
206206

207207
// function finds the appropriate timer source trigger for the master timer index provided
208208
// returns -1 if no trigger source is found
209-
// currently supports the master timers to be from TIM1 to TIM8
209+
// currently supports the master timers to be from TIM1 to TIM4 and TIM8
210210
int _getTriggerSourceRegister(HardwareTimer* timer) {
211211
#if defined(TIM1) && defined(LL_TIM_TS_ITR0)
212212
if (timer->getHandle()->Instance == TIM1) return LL_TIM_TS_ITR0;// return TIM_TS_ITR0;
@@ -223,14 +223,8 @@ int _getTriggerSourceRegister(HardwareTimer* timer) {
223223
#if defined(TIM5) && defined(LL_TIM_TS_ITR4)
224224
if (timer->getHandle()->Instance == TIM5) return LL_TIM_TS_ITR4;//return TIM_TS_ITR4;
225225
#endif
226-
#if defined(TIM6) && defined(LL_TIM_TS_ITR5)
227-
if (timer->getHandle()->Instance == TIM6) return LL_TIM_TS_ITR5;//return TIM_TS_ITR5;
228-
#endif
229-
#if defined(TIM7) && defined(LL_TIM_TS_ITR6)
230-
if (timer->getHandle()->Instance == TIM7) return LL_TIM_TS_ITR6;//return TIM_TS_ITR6;
231-
#endif
232-
#if defined(TIM8) && defined(LL_TIM_TS_ITR7)
233-
if (timer->getHandle()->Instance == TIM8) return LL_TIM_TS_ITR7;// return TIM_TS_ITR7;
226+
#if defined(TIM8) && defined(LL_TIM_TS_ITR5)
227+
if (timer->getHandle()->Instance == TIM8) return LL_TIM_TS_ITR5;//return TIM_TS_ITR5;
234228
#endif
235229
return -1;
236230
}

0 commit comments

Comments
 (0)