Skip to content

Commit b417ed0

Browse files
committed
[USB] Update TIM definition
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 74982c5 commit b417ed0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cores/arduino/stm32/usb/cdc/usbd_cdc_if.h

+8
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,18 @@
4040
#endif
4141

4242
#ifndef CDC_TIM
43+
#ifdef TIM6
4344
#define CDC_TIM TIM6
45+
#else
46+
#define CDC_TIM TIM4
47+
#endif
4448
#endif
4549
#ifndef CDC_TIM_IRQn
50+
#ifdef TIM6
4651
#define CDC_TIM_IRQn TIM6_IRQn
52+
#else
53+
#define CDC_TIM_IRQn TIM4_IRQn
54+
#endif
4755
#endif
4856

4957
/* Periodically, the state of the buffer "UserTxBuffer" is checked.

0 commit comments

Comments
 (0)