X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fpwm_at91.c;h=a95e60613fa6d0e5e8140735f24d468eec0ecc79;hb=4e98a3386ef949ae85eb5273c3805804a5f03af4;hp=e0706812d83718142d56f82b54f52bf23b8f259e;hpb=515886be3106584a6d695d4b5453730121b91f74;p=bertos.git diff --git a/bertos/cpu/arm/drv/pwm_at91.c b/bertos/cpu/arm/drv/pwm_at91.c index e0706812..a95e6061 100644 --- a/bertos/cpu/arm/drv/pwm_at91.c +++ b/bertos/cpu/arm/drv/pwm_at91.c @@ -39,7 +39,7 @@ #include "pwm_at91.h" #include "hw/pwm_map.h" -#include "hw/hw_cpu.h" +#include #include "cfg/cfg_pwm.h" // Define logging setting (for cfg/log.h module). @@ -120,7 +120,7 @@ void pwm_hw_setFrequency(PwmDev dev, uint32_t freq) for(int i = 0; i <= PWM_HW_MAX_PRESCALER_STEP; i++) { - period = CLOCK_FREQ / (BV(i) * freq); + period = CPU_FREQ / (BV(i) * freq); // LOG_INFO("period[%ld], prescale[%d]\n", period, i); if ((period < PWM_HW_MAX_PERIOD) && (period != 0)) { @@ -157,8 +157,7 @@ void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty) } else { - ASSERT(PWM_CCNT0); - /* + /* * If polarity flag is true we must invert * PWM polarity. */