projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add set freq and enable function. Refactor init funtions. Add other test.
[bertos.git]
/
bertos
/
drv
/
pwm.h
diff --git
a/bertos/drv/pwm.h
b/bertos/drv/pwm.h
index 03d98453499af5f23a6fb4643a414acfefebc1b9..58c4ee5ae5794530dc3d31e52302cd85ea0441f7 100644
(file)
--- a/
bertos/drv/pwm.h
+++ b/
bertos/drv/pwm.h
@@
-35,6
+35,7
@@
*
* \version $Id$
* \author Francesco Sacchi <batt@develer.com>
*
* \version $Id$
* \author Francesco Sacchi <batt@develer.com>
+ * \author Daniele Basile <asterix@develer.com>
*/
#ifndef DRV_PWM_H
*/
#ifndef DRV_PWM_H
@@
-43,11
+44,18
@@
#include <pwm_map.h>
#include <cfg/compiler.h>
#include <pwm_map.h>
#include <cfg/compiler.h>
+#define PWM_MAX_DUTY ((pwm_duty_t)0xFFFF)
+#define PWM_MAX_PERIOD 0xFFFF
+#define PWM_MAX_PERIOD_LOG2 16
+
typedef uint16_t pwm_duty_t;
typedef uint16_t pwm_duty_t;
+typedef uint32_t pwm_freq_t;
void pwm_setDuty(PwmDev dev, pwm_duty_t duty);
void pwm_setDuty(PwmDev dev, pwm_duty_t duty);
+void pwm_setFrequency(PwmDev dev, pwm_freq_t freq);
+void pwm_enable(PwmDev dev, bool state);
void pwm_init(void);
void pwm_init(void);
-#define PWM_MAX_DUTY 100
+void pwm_test(void);
#endif /* DRV_PWM_H */
#endif /* DRV_PWM_H */