Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
Diff: PwmOut.h
- Revision:
- 55:d722ed6a4237
- Parent:
- 54:71b101360fb9
- Child:
- 59:0883845fe643
--- a/PwmOut.h Tue Jan 08 12:46:36 2013 +0000 +++ b/PwmOut.h Wed Jan 16 12:56:34 2013 +0000 @@ -37,7 +37,7 @@ * #include "mbed.h" * * PwmOut led(LED1); - * + * * int main() { * while(1) { * led = led + 0.01; @@ -70,7 +70,7 @@ /** Set the ouput duty-cycle, specified as a percentage (float) * - * @param value A floating-point value representing the output duty-cycle, + * @param value A floating-point value representing the output duty-cycle, * specified as a percentage. The value should lie between * 0.0f (representing on 0%) and 1.0f (representing on 100%). * Values outside this range will be saturated to 0.0f or 1.0f. @@ -82,7 +82,7 @@ /** Return the current output duty-cycle setting, measured as a percentage (float) * * @returns - * A floating-point value representing the current duty-cycle being output on the pin, + * A floating-point value representing the current duty-cycle being output on the pin, * measured as a percentage. The returned value will lie between * 0.0f (representing on 0%) and 1.0f (representing on 100%). * @@ -92,7 +92,7 @@ float read() { return pwmout_read(&_pwm); } - + /** Set the PWM period, specified in seconds (float), keeping the duty cycle the same. * * @note @@ -140,12 +140,12 @@ write(value); return *this; } - + PwmOut& operator= (PwmOut& rhs) { write(rhs.read()); return *this; } - + /** An operator shorthand for read() */ operator float() {