X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fpwm.c;h=cb5a45fb0e7293b7f5c292ff2fad620dc9f09a3b;hb=03a831bf368e779ec42cb373d62d054d40efbdaa;hp=021d2437c79e4f7f1e9b44cc74f7de1ff628e77a;hpb=6286e79f3da8091ec8da66469488a11035cada11;p=bertos.git diff --git a/bertos/drv/pwm.c b/bertos/drv/pwm.c index 021d2437..cb5a45fb 100644 --- a/bertos/drv/pwm.c +++ b/bertos/drv/pwm.c @@ -38,7 +38,15 @@ * \author Daniele Basile */ +#include "cfg/cfg_pwm.h" + #include + +// Define logging setting (for cfg/log.h module). +#define LOG_LEVEL PWM_LOG_LEVEL +#define LOG_VERBOSITY PWM_LOG_FORMAT + +#include #include #include @@ -63,7 +71,7 @@ void pwm_setDuty(PwmDev dev, pwm_duty_t duty) real_duty = (uint64_t)(duty * period) >> (uint64_t)PWM_MAX_PERIOD_LOG2; -// TRACEMSG("real_duty[%d] duty[%d], period[%d]", real_duty, duty, period); + LOG_INFO("real_duty[%d] duty[%d], period[%d]", real_duty, duty, period); pwm_hw_setDutyUnlock(dev, real_duty); } @@ -91,7 +99,7 @@ void pwm_enable(PwmDev dev, bool state) */ void pwm_init(void) { - cpuflags_t flags; + cpu_flags_t flags; PwmDev dev; IRQ_SAVE_DISABLE(flags);