diff options
author | Marti Bolivar <mbolivar@mit.edu> | 2010-10-22 21:13:02 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@mit.edu> | 2010-10-22 21:13:02 -0400 |
commit | 6c956a383834b66c29591294f0926ced22f3e3b7 (patch) | |
tree | 00214f59655cf96d747228d9ffb8f6059b63b31c /wirish/pwm.h | |
parent | dd7e6ecdafcb8938e23dfd18a36d70628fbc74bd (diff) | |
download | librambutan-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.h | 11 |
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 } |