Skip to content
Commit 28811862 authored by Mathieu Choplain's avatar Mathieu Choplain Committed by Fabio Baltieri
Browse files

drivers: counter: stm32_timer: use "cc" interrupt if it exists



Currently, the STM32 TIM counter driver will always register itself as ISR
for interrupts[0] of the timer node. This works fine for timers which have
a single "global" interrupt but not for others (e.g., Advanced Timer) which
have separate IRQ lines for various events.

Borrow the pattern from PWM driver: use the "cc" interrupt if it exists on
timer node, otherwise use the "global" interrupt. If neither of those are
found, a build error is raised to ensure silent failures cannot occur.

Signed-off-by: default avatarMathieu Choplain <mathieu.choplain@st.com>
parent ee894501
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment