LPC2: silent warning in nightly test.
[bertos.git] / bertos / cpu / arm / drv / pwm_at91.c
index e0706812d83718142d56f82b54f52bf23b8f259e..a95e60613fa6d0e5e8140735f24d468eec0ecc79 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "pwm_at91.h"
 #include "hw/pwm_map.h"
-#include "hw/hw_cpu.h"
+#include <hw/hw_cpufreq.h>
 #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.
          */