projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
pwm_at91.c
diff --git
a/bertos/cpu/arm/drv/pwm_at91.c
b/bertos/cpu/arm/drv/pwm_at91.c
index e0706812d83718142d56f82b54f52bf23b8f259e..a95e60613fa6d0e5e8140735f24d468eec0ecc79 100644
(file)
--- a/
bertos/cpu/arm/drv/pwm_at91.c
+++ b/
bertos/cpu/arm/drv/pwm_at91.c
@@
-39,7
+39,7
@@
#include "pwm_at91.h"
#include "hw/pwm_map.h"
#include "pwm_at91.h"
#include "hw/pwm_map.h"
-#include
"hw/hw_cpu.h"
+#include
<hw/hw_cpufreq.h>
#include "cfg/cfg_pwm.h"
// Define logging setting (for cfg/log.h module).
#include "cfg/cfg_pwm.h"
// Define logging setting (for cfg/log.h module).
@@
-120,7
+120,7
@@
void pwm_hw_setFrequency(PwmDev dev, uint32_t freq)
for(int i = 0; i <= PWM_HW_MAX_PRESCALER_STEP; i++)
{
for(int i = 0; i <= PWM_HW_MAX_PRESCALER_STEP; i++)
{
- period = C
LOCK
_FREQ / (BV(i) * freq);
+ period = C
PU
_FREQ / (BV(i) * freq);
// LOG_INFO("period[%ld], prescale[%d]\n", period, i);
if ((period < PWM_HW_MAX_PERIOD) && (period != 0))
{
// LOG_INFO("period[%ld], prescale[%d]\n", period, i);
if ((period < PWM_HW_MAX_PERIOD) && (period != 0))
{
@@
-157,8
+157,7
@@
void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty)
}
else
{
}
else
{
- ASSERT(PWM_CCNT0);
- /*
+ /*
* If polarity flag is true we must invert
* PWM polarity.
*/
* If polarity flag is true we must invert
* PWM polarity.
*/