aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/pwm.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-10-22 21:13:02 -0400
committerMarti Bolivar <mbolivar@mit.edu>2010-10-22 21:13:02 -0400
commit6c956a383834b66c29591294f0926ced22f3e3b7 (patch)
tree00214f59655cf96d747228d9ffb8f6059b63b31c /wirish/pwm.h
parentdd7e6ecdafcb8938e23dfd18a36d70628fbc74bd (diff)
downloadlibrambutan-6c956a383834b66c29591294f0926ced22f3e3b7.tar.gz
librambutan-6c956a383834b66c29591294f0926ced22f3e3b7.zip
maple mini runs blinky now.
still need usb descriptors to improve, and also nothing else is tested.
Diffstat (limited to 'wirish/pwm.h')
-rw-r--r--wirish/pwm.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/wirish/pwm.h b/wirish/pwm.h
index fe170cd..6d0ddaf 100644
--- a/wirish/pwm.h
+++ b/wirish/pwm.h
@@ -36,7 +36,16 @@ extern "C"{
#endif
#define analogWrite pwmWrite
-void pwmWrite(uint8, uint16);
+
+/**
+ * Set the PWM duty.
+ *
+ * User code is expected to determine and honor the maximum value
+ * (based on the configured period). As a convenience, analogWrite is
+ * an alias of pwmWrite to ease porting Arduino code, though period
+ * and duty will have to be recalibrated
+ */
+void pwmWrite(uint8 pin, uint16 duty_cycle);
#ifdef __cplusplus
}