projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add comment
[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 7030dd2a9d375c37ed934d486dfc264205125ae4..39627382b0f93d6404734fb78086a5056d1f202f 100644
(file)
--- a/
bertos/cpu/arm/drv/pwm_at91.c
+++ b/
bertos/cpu/arm/drv/pwm_at91.c
@@
-34,18
+34,17
@@
* \brief PWM hardware-specific implementation
*
* \version $Id$
* \brief PWM hardware-specific implementation
*
* \version $Id$
- *
* \author Daniele Basile <asterix@develer.com>
*/
#include "pwm_at91.h"
#include "hw/pwm_map.h"
* \author Daniele Basile <asterix@develer.com>
*/
#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).
#define LOG_LEVEL PWM_LOG_LEVEL
#include "cfg/cfg_pwm.h"
// Define logging setting (for cfg/log.h module).
#define LOG_LEVEL PWM_LOG_LEVEL
-#define LOG_
VERBOSITY PWM_LOG_VERBOSITY
+#define LOG_
FORMAT PWM_LOG_FORMAT
#include <cfg/log.h>
#include <cfg/macros.h>
#include <cfg/log.h>
#include <cfg/macros.h>
@@
-121,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))
{