Skip to content

Commit 5d32e51

Browse files
committed
Fix TIM6_IRQn definition
If no DAC then TIM6_IRQn is already defined. Fixes #739 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 9ddecc3 commit 5d32e51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: cores/arduino/stm32/timer.h

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ extern "C" {
5959
#endif
6060
#endif
6161
#if defined(TIM6_BASE) && !defined(TIM6_IRQn)
62+
#if defined(DAC_BASE) || defined(DAC1_BASE)
6263
#if defined(STM32G0xx)
6364
#define TIM6_IRQn TIM6_DAC_LPTIM1_IRQn
6465
#define TIM6_IRQHandler TIM6_DAC_LPTIM1_IRQHandler
@@ -67,6 +68,7 @@ extern "C" {
6768
#define TIM6_IRQHandler TIM6_DAC_IRQHandler
6869
#endif
6970
#endif
71+
#endif
7072
#if defined(TIM7_BASE) && !defined(TIM7_IRQn)
7173
#if defined(STM32G0xx)
7274
#define TIM7_IRQn TIM7_LPTIM2_IRQn

0 commit comments

Comments
 (0)