*
*/
-#include <cpu/detect.h>
-
-#if CPU_AVR
- #warning TODO:No AVR implementation of PWM.
-/*#elif Add other AVR families here */
-#else
- #error Unknown CPU
-#endif
+
+#include "pwm_avr.h"
+#include "hw/hw_cpu.h"
+
+#warning TODO:This is an exmple of implementation of PWM low level channel for AVR, implemnt it!
+
+/**
+ * Get preiod from select channel
+ *
+ * \a dev channel
+ */
+pwm_period_t pwm_hw_getPeriod(PwmDev dev)
+{
+ /*
+ * Put here a code to get period value of select
+ * PWM channel
+ */
+
+ return 0;
+}
+
+/**
+ * Set pwm waveform frequecy.
+ *
+ * \a freq in Hz
+ */
+void pwm_hw_setFrequency(PwmDev dev, uint32_t freq)
+{
+ /*
+ * Put here a code to set frequency of select
+ * PWM channel
+ */
+
+// TRACEMSG("PWM ch[%d] period[%d]", dev, period);
+}
+
+/**
+ * Set pwm duty cycle.
+ *
+ * \a duty value 0 - 2^16
+ */
+void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty)
+{
+ /*
+ * Put here a code to set duty of select
+ * PWM channel
+ */
+
+// TRACEMSG("PWM ch[%d] duty[%d], period[%ld]", dev, duty, *pwm_map[dev].period_reg);
+}
+
+
+/**
+ * Enable select pwm channel
+ */
+void pwm_hw_enable(PwmDev dev)
+{
+ /*
+ * Put here a code to enable
+ * a select PWM channel
+ */
+}
+
+/**
+ * Disable select pwm channel
+ */
+void pwm_hw_disable(PwmDev dev)
+{
+ /*
+ * Put here a code to disable
+ * a select PWM channel
+ */
+}
+
+
+/**
+ * Init pwm.
+ */
+void pwm_hw_init(void)
+{
+ /*
+ * Put here a code to init
+ * a PWM hawdware
+ */
+}
+