summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/timer.c')
-rw-r--r--stmhal/timer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stmhal/timer.c b/stmhal/timer.c
index 7db15f6492..39f168fc89 100644
--- a/stmhal/timer.c
+++ b/stmhal/timer.c
@@ -216,9 +216,11 @@ TIM_HandleTypeDef *timer_tim6_init(uint freq) {
// Interrupt dispatch
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
+ #if MICROPY_HW_ENABLE_SERVO
if (htim == &TIM5_Handle) {
servo_timer_irq_callback();
}
+ #endif
}
// Get the frequency (in Hz) of the source clock for the given timer.