* \brief PWM hardware-specific implementation
*
* \version $Id$
- *
* \author Daniele Basile <asterix@develer.com>
*/
#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).
#define LOG_LEVEL PWM_LOG_LEVEL
-#define LOG_VERBOSITY PWM_LOG_VERBOSITY
+#define LOG_FORMAT PWM_LOG_FORMAT
#include <cfg/log.h>
#include <cfg/macros.h>
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))
{
}
else
{
- ASSERT(PWM_CCNT0);
- /*
+ /*
* If polarity flag is true we must invert
* PWM polarity.
*/