projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move appconfig to cfg dir.
[bertos.git]
/
bertos
/
drv
/
pwm.h
diff --git
a/bertos/drv/pwm.h
b/bertos/drv/pwm.h
index 03d98453499af5f23a6fb4643a414acfefebc1b9..2648b01f5c618facb4f0a9362197011e533c3279 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,25
@@
#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
+/**
+ * Test function prototypes.
+ *
+ * See pwm_test.c for implemntation of these functions.
+ */
+int pwm_testRun(void);
+int pwm_testSetup(void);
+int pwm_testTearDown(void);
#endif /* DRV_PWM_H */
#endif /* DRV_PWM_H */