diff options
author | Damien George <damien.p.george@gmail.com> | 2017-07-14 17:41:43 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-07-14 17:41:43 +1000 |
commit | 4fa9d97e4db333e3252b0e87584d29753f2da74d (patch) | |
tree | 105b1aca58593464b3a1124612ac5e587d2a2001 /stmhal/timer.c | |
parent | 9cca14a5dcba9e850e150fbd77803626df190f55 (diff) |
stmhal/servo: Don't compile servo code when it's not enabled.
Diffstat (limited to 'stmhal/timer.c')
-rw-r--r-- | stmhal/timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stmhal/timer.c b/stmhal/timer.c index 7db15f649..39f168fc8 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. |