cpu/samd21: s/F_CPU/CLOCK_CORECLOCK/
This commit is contained in:
parent
3101baa589
commit
dda721ca06
@ -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++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user