From: asterix Date: Tue, 10 Jun 2008 17:58:14 +0000 (+0000) Subject: Add missing include. Fix and clean boderplate for avr pwm. X-Git-Tag: 2.0.0~495 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=33e4ca86628186654baa6f3985edbcaa0722f954;hp=30ff891643f59b2fc5effd1c7ca7fa7816138d9d;p=bertos.git Add missing include. Fix and clean boderplate for avr pwm. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1439 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/avr/drv/pwm_avr.c b/bertos/cpu/avr/drv/pwm_avr.c index b88a0f93..16e420bd 100644 --- a/bertos/cpu/avr/drv/pwm_avr.c +++ b/bertos/cpu/avr/drv/pwm_avr.c @@ -44,6 +44,22 @@ #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 */ } + + + diff --git a/bertos/drv/pwm.h b/bertos/drv/pwm.h index 1f5facf1..8bc2bba4 100644 --- a/bertos/drv/pwm.h +++ b/bertos/drv/pwm.h @@ -42,6 +42,9 @@ #define DRV_PWM_H #include "hw/pwm_map.h" + +#include + #include CPU_HEADER(pwm) #include