Refactor switch context ASM files to comply to Wizard.
[bertos.git] / bertos / cpu / avr / drv / pwm_avr.c
index ada713565e5afc0f3e31a74b62e92f6ad871f5bb..1d76a1a34271a409389f0a7440470b1c90f6d94a 100644 (file)
 
 
 #include "pwm_avr.h"
-#include "hw_cpu.h"
-
-#include "appconfig.h"
+#include <hw/hw_cpufreq.h>
 
 #warning TODO:This is an exmple of implementation of PWM low level channel for AVR, implemnt it!
 
+/**
+ * Set PWM polarity to select pwm channel
+ */
+void pwm_hw_setPolarity(PwmDev dev, bool pol)
+{
+
+       /*
+        * Put here a code to PWM polarity of select
+        * PWM channel
+        */
+
+       //Only for test remove when implement this function
+       (void)dev;
+       (void)pol;
+}
+
 /**
  * Get preiod from select channel
  *
@@ -58,7 +72,10 @@ pwm_period_t pwm_hw_getPeriod(PwmDev dev)
         * PWM channel
         */
 
-       return 0
+       //Only for test remove when implement this function
+       (void)dev;
+
+       return 0;
 }
 
 /**
@@ -73,7 +90,10 @@ void pwm_hw_setFrequency(PwmDev dev, uint32_t freq)
         * PWM channel
         */
 
-//     TRACEMSG("PWM ch[%d] period[%d]", dev, period);
+       //Only for test remove when implement this function
+       (void)dev;
+       (void)freq;
+
 }
 
 /**
@@ -88,7 +108,10 @@ void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty)
         * PWM channel
         */
 
-//     TRACEMSG("PWM ch[%d] duty[%d], period[%ld]", dev, duty, *pwm_map[dev].period_reg);
+       //Only for test remove when implement this function
+       (void)dev;
+       (void)duty;
+
 }
 
 
@@ -98,9 +121,12 @@ void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty)
 void pwm_hw_enable(PwmDev dev)
 {
        /*
-        * Put here a code to enable 
+        * Put here a code to enable
         * a select PWM channel
         */
+
+       //Only for test remove when implement this function
+       (void)dev;
 }
 
 /**
@@ -109,9 +135,12 @@ void pwm_hw_enable(PwmDev dev)
 void pwm_hw_disable(PwmDev dev)
 {
        /*
-        * Put here a code to disable 
+        * Put here a code to disable
         * a select PWM channel
         */
+
+       //Only for test remove when implement this function
+       (void)dev;
 }
 
 
@@ -121,8 +150,11 @@ void pwm_hw_disable(PwmDev dev)
 void pwm_hw_init(void)
 {
        /*
-        * Put here a code to init 
+        * Put here a code to init
         * a PWM hawdware
         */
 }
 
+
+
+