Skip to content
Snippets Groups Projects
Commit dda721ca authored by Hauke Petersen's avatar Hauke Petersen
Browse files

cpu/samd21: s/F_CPU/CLOCK_CORECLOCK/

parent 3101baa5
No related branches found
No related tags found
No related merge requests found
...@@ -102,11 +102,11 @@ int pwm_init(pwm_t dev, pwm_mode_t mode, ...@@ -102,11 +102,11 @@ int pwm_init(pwm_t dev, pwm_mode_t mode,
} }
/* calculate the closest possible clock presacler */ /* 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) { if (prescaler == 0xff) {
return -2; return -2;
} }
f_real = (F_CPU / (scale * resolution)); f_real = (CLOCK_CORECLOCK / (scale * resolution));
/* configure the used pins */ /* configure the used pins */
for (int i = 0; i < PWM_MAX_CHANNELS; i++) { for (int i = 0; i < PWM_MAX_CHANNELS; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment