File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 34
34
#include "shared-bindings/microcontroller/__init__.h"
35
35
#include "shared-bindings/microcontroller/Pin.h"
36
36
37
+ #if !(CPY_STM32H7 )
38
+
37
39
#define ALL_CLOCKS 0xFFFF
38
40
#define NULL_IRQ 0xFF
39
41
@@ -193,14 +195,18 @@ TIM_TypeDef * stm_peripherals_find_timer(void) {
193
195
// If no results are found, no unclaimed pins with this timer are in this package,
194
196
// and it is safe to pick
195
197
if (timer_in_package == false && mcu_tim_banks [i ] != NULL ) {
198
+ // DEBUG: print the timer
196
199
return mcu_tim_banks [i ];
200
+ mp_printf (& mp_plat_print , "Timer: %d\n" ,i );
197
201
}
198
202
}
199
203
//TODO: secondary search for timers outside the pins in the board profile
200
204
201
205
// Work backwards - higher index timers have fewer pin allocations
202
206
for (size_t i = (MP_ARRAY_SIZE (mcu_tim_banks ) - 1 ); i >= 0 ; i -- ) {
203
207
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 );
204
210
return mcu_tim_banks [i ];
205
211
}
206
212
}
@@ -449,3 +455,5 @@ void TIM17_IRQHandler(void) {
449
455
callback_router (17 );
450
456
}
451
457
#endif
458
+
459
+ #endif
You can’t perform that action at this time.
0 commit comments