aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/pwm.h
diff options
context:
space:
mode:
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
}