1010#pragma message("")
1111
1212
13- // #define SIMPLEFOC_STM32_DEBUG
14-
1513#ifdef SIMPLEFOC_STM32_DEBUG
1614void printTimerCombination (int numPins, PinMap* timers[], int score);
1715int getTimerNumber (int timerIndex);
@@ -210,28 +208,28 @@ void _stopTimers(HardwareTimer **timers_to_stop, int timer_num)
210208// returns -1 if no trigger source is found
211209// currently supports the master timers to be from TIM1 to TIM8
212210int _getTriggerSourceRegister (HardwareTimer* timer) {
213- #if defined(TIM1) && TIM_TS_ITR0
211+ #if defined(TIM1) && defined(LL_TIM_TS_ITR0)
214212 if (timer->getHandle ()->Instance == TIM1) return LL_TIM_TS_ITR0;// return TIM_TS_ITR0;
215213 #endif
216- #if defined(TIM2) && TIM_TS_ITR1
214+ #if defined(TIM2) && defined(LL_TIM_TS_ITR1)
217215 if (timer->getHandle ()->Instance == TIM2) return LL_TIM_TS_ITR1;// return TIM_TS_ITR1;
218216 #endif
219- #if defined(TIM3) && TIM_TS_ITR2
217+ #if defined(TIM3) && defined(LL_TIM_TS_ITR2)
220218 if (timer->getHandle ()->Instance == TIM3) return LL_TIM_TS_ITR2;// return TIM_TS_ITR2;
221219 #endif
222- #if defined(TIM4) && TIM_TS_ITR3
220+ #if defined(TIM4) && defined(LL_TIM_TS_ITR3)
223221 if (timer->getHandle ()->Instance == TIM4) return LL_TIM_TS_ITR3;// return TIM_TS_ITR3;
224222 #endif
225- #if defined(TIM5) && TIM_TS_ITR4
223+ #if defined(TIM5) && defined(LL_TIM_TS_ITR4)
226224 if (timer->getHandle ()->Instance == TIM5) return LL_TIM_TS_ITR4;// return TIM_TS_ITR4;
227225 #endif
228- #if defined(TIM6) && TIM_TS_ITR5
226+ #if defined(TIM6) && defined(LL_TIM_TS_ITR5)
229227 if (timer->getHandle ()->Instance == TIM6) return LL_TIM_TS_ITR5;// return TIM_TS_ITR5;
230228 #endif
231- #if defined(TIM7) && TIM_TS_ITR6
229+ #if defined(TIM7) && defined(LL_TIM_TS_ITR6)
232230 if (timer->getHandle ()->Instance == TIM7) return LL_TIM_TS_ITR6;// return TIM_TS_ITR6;
233231 #endif
234- #if defined(TIM8) && TIM_TS_ITR7
232+ #if defined(TIM8) && defined(LL_TIM_TS_ITR7)
235233 if (timer->getHandle ()->Instance == TIM8) return LL_TIM_TS_ITR7;// return TIM_TS_ITR7;
236234 #endif
237235 return -1 ;
@@ -256,9 +254,9 @@ void _alignTimersNew() {
256254 timers[numTimers++] = timer;
257255 }
258256
259- #ifdef SIMPLEFOC_STM32_DEBUG
260- SIMPLEFOC_DEBUG (" STM32-DRV: Syncronising timers!\n Timer no. " , numTimers);
261- #endif
257+ #ifdef SIMPLEFOC_STM32_DEBUG
258+ SIMPLEFOC_DEBUG (" STM32-DRV: Syncronising timers! Timer no. " , numTimers);
259+ #endif
262260
263261 // see if there is more then 1 timers used for the pwm
264262 // if yes, try to align timers
0 commit comments