File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ extern void _PM_IRQ_HANDLER(void);
36
36
void * common_hal_rgbmatrix_timer_allocate () {
37
37
TIM_TypeDef * timer = stm_peripherals_find_timer ();
38
38
stm_peripherals_timer_reserve (timer );
39
+ stm_peripherals_timer_never_reset (timer );
39
40
return timer ;
40
41
}
41
42
Original file line number Diff line number Diff line change @@ -195,18 +195,14 @@ TIM_TypeDef * stm_peripherals_find_timer(void) {
195
195
// If no results are found, no unclaimed pins with this timer are in this package,
196
196
// and it is safe to pick
197
197
if (timer_in_package == false && mcu_tim_banks [i ] != NULL ) {
198
- // DEBUG: print the timer
199
198
return mcu_tim_banks [i ];
200
- mp_printf (& mp_plat_print , "Timer: %d\n" ,i );
201
199
}
202
200
}
203
201
//TODO: secondary search for timers outside the pins in the board profile
204
202
205
203
// Work backwards - higher index timers have fewer pin allocations
206
204
for (size_t i = (MP_ARRAY_SIZE (mcu_tim_banks ) - 1 ); i >= 0 ; i -- ) {
207
205
if ((!stm_timer_reserved [i ]) && (mcu_tim_banks [i ] != NULL )) {
208
- // DEBUG: print the timer
209
- mp_printf (& mp_plat_print , "Timer: %d\n" ,i );
210
206
return mcu_tim_banks [i ];
211
207
}
212
208
}
You can’t perform that action at this time.
0 commit comments