From dda721ca0626c44cd2bcb46892486dfc2171e570 Mon Sep 17 00:00:00 2001 From: Hauke Petersen <hauke.petersen@fu-berlin.de> Date: Tue, 5 Jan 2016 13:31:14 +0100 Subject: [PATCH] cpu/samd21: s/F_CPU/CLOCK_CORECLOCK/ --- cpu/samd21/periph/pwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/samd21/periph/pwm.c b/cpu/samd21/periph/pwm.c index 9260a2421d..da64c0810b 100644 --- a/cpu/samd21/periph/pwm.c +++ b/cpu/samd21/periph/pwm.c @@ -102,11 +102,11 @@ int pwm_init(pwm_t dev, pwm_mode_t mode, } /* calculate the closest possible clock presacler */ - prescaler = get_prescaler(F_CPU / (frequency * resolution), &scale); + prescaler = get_prescaler(CLOCK_CORECLOCK / (frequency * resolution), &scale); if (prescaler == 0xff) { return -2; } - f_real = (F_CPU / (scale * resolution)); + f_real = (CLOCK_CORECLOCK / (scale * resolution)); /* configure the used pins */ for (int i = 0; i < PWM_MAX_CHANNELS; i++) { -- GitLab