diff options
| author | Lucian Copeland <hierophect@gmail.com> | 2020-07-16 17:11:24 -0400 |
|---|---|---|
| committer | Lucian Copeland <hierophect@gmail.com> | 2020-07-16 17:11:24 -0400 |
| commit | dc6902a33e33384e60ef825deac4fa1d9642a3b2 (patch) | |
| tree | 6aa724e922b2f4f238f4254863fb1d9f0bfdec93 | |
| parent | 6a49766df04ba23d2c5f0bdb24f826ff1355340d (diff) | |
Exclude timers from H7 builds
| -rw-r--r-- | ports/stm/peripherals/timers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/stm/peripherals/timers.c b/ports/stm/peripherals/timers.c index aa189da84..7950d8a57 100644 --- a/ports/stm/peripherals/timers.c +++ b/ports/stm/peripherals/timers.c @@ -34,6 +34,8 @@ #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" +#if !(CPY_STM32H7) + #define ALL_CLOCKS 0xFFFF #define NULL_IRQ 0xFF @@ -193,7 +195,9 @@ TIM_TypeDef * stm_peripherals_find_timer(void) { // If no results are found, no unclaimed pins with this timer are in this package, // and it is safe to pick if (timer_in_package == false && mcu_tim_banks[i] != NULL) { + // DEBUG: print the timer return mcu_tim_banks[i]; + mp_printf(&mp_plat_print, "Timer: %d\n",i); } } //TODO: secondary search for timers outside the pins in the board profile @@ -201,6 +205,8 @@ TIM_TypeDef * stm_peripherals_find_timer(void) { // Work backwards - higher index timers have fewer pin allocations for (size_t i = (MP_ARRAY_SIZE(mcu_tim_banks) - 1); i >= 0; i--) { if ((!stm_timer_reserved[i]) && (mcu_tim_banks[i] != NULL)) { + // DEBUG: print the timer + mp_printf(&mp_plat_print, "Timer: %d\n",i); return mcu_tim_banks[i]; } } @@ -449,3 +455,5 @@ void TIM17_IRQHandler(void) { callback_router(17); } #endif + +#endif |
