diff --git a/cpu/kinetis/periph/pwm.c b/cpu/kinetis/periph/pwm.c index 5f2fd448b7..841191ecfc 100644 --- a/cpu/kinetis/periph/pwm.c +++ b/cpu/kinetis/periph/pwm.c @@ -29,6 +29,12 @@ #include "assert.h" #include "periph/pwm.h" +/* This driver uses the FlexTimer module (FTM) for generating PWM signals, but + * not all Kinetis CPUs have such a module. This preprocessor condition prevents + * compilation errors when the CPU header lacks the register definitions for the + * FTM */ +#ifdef FTM0 + #define PRESCALER_MAX (7U) static inline FTM_Type *ftm(pwm_t pwm) @@ -150,3 +156,5 @@ void pwm_poweroff(pwm_t pwm) } #endif } + +#endif /* defined(FTM0) */