X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Favr%2Fdrv%2Fpwm_avr.c;h=1d76a1a34271a409389f0a7440470b1c90f6d94a;hb=24362270bbdf61ceedf3cecaf63fb1d36571e554;hp=b88a0f934458f343e5cde72f5dd385600d3bb2d9;hpb=c22fe24a0da896a52dbc3882390ec18a440ef56a;p=bertos.git diff --git a/bertos/cpu/avr/drv/pwm_avr.c b/bertos/cpu/avr/drv/pwm_avr.c index b88a0f93..1d76a1a3 100644 --- a/bertos/cpu/avr/drv/pwm_avr.c +++ b/bertos/cpu/avr/drv/pwm_avr.c @@ -40,10 +40,26 @@ #include "pwm_avr.h" -#include "hw/hw_cpu.h" +#include #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 * @@ -56,6 +72,9 @@ pwm_period_t pwm_hw_getPeriod(PwmDev dev) * PWM channel */ + //Only for test remove when implement this function + (void)dev; + return 0; } @@ -71,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; + } /** @@ -86,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; + } @@ -96,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; } /** @@ -107,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; } @@ -119,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 */ } + + +