diff options
author | Alex Voinea <voinea.dragos.alexandru@gmail.com> | 2022-12-12 22:14:09 +0100 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2022-12-15 10:05:43 -0500 |
commit | e33b41abaabe7d2be2207c79d5ed59cb8ce7babc (patch) | |
tree | 60316450af67509040b3dc544aa0c35728e14e6e /src/stm32/stm32f0_timer.c | |
parent | 9d668d63a7183a62b9f78ef7e40f1a2089a43097 (diff) | |
download | kutter-e33b41abaabe7d2be2207c79d5ed59cb8ce7babc.tar.gz kutter-e33b41abaabe7d2be2207c79d5ed59cb8ce7babc.tar.xz kutter-e33b41abaabe7d2be2207c79d5ed59cb8ce7babc.zip |
stm32g0: add stm32g0b0 support
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
Diffstat (limited to 'src/stm32/stm32f0_timer.c')
-rw-r--r-- | src/stm32/stm32f0_timer.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/stm32/stm32f0_timer.c b/src/stm32/stm32f0_timer.c index 4f5e6d38..0d8ed3a3 100644 --- a/src/stm32/stm32f0_timer.c +++ b/src/stm32/stm32f0_timer.c @@ -20,14 +20,17 @@ ****************************************************************/ // Use 32bit TIM2 timer if available (otherwise use 16bit TIM3 timer) -#ifdef TIM2 -#define TIMx TIM2 -#define TIMx_IRQn TIM2_IRQn -#define HAVE_TIMER_32BIT 1 -#else -#define TIMx TIM3 -#define TIMx_IRQn TIM3_IRQn -#define HAVE_TIMER_32BIT 0 +#if defined(TIM2) + #define TIMx TIM2 + #define TIMx_IRQn TIM2_IRQn + #define HAVE_TIMER_32BIT 1 +#elif defined(TIM3) + #define TIMx TIM3 + #define TIMx_IRQn TIM3_IRQn + #define HAVE_TIMER_32BIT 0 + #ifdef TIM4 + #define TIM3_IRQn TIM3_TIM4_IRQn + #endif #endif static inline uint32_t |