mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
kinetis: Filter out PWM code if no FTM exists
This commit is contained in:
parent
11361ec7e1
commit
005b4bfbb3
@ -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) */
|
||||
|
Loading…
Reference in New Issue
Block a user