mbed-drivers
|
#include <PwmOut.h>
Public Member Functions | |
PwmOut (PinName pin) | |
void | write (float value) |
float | read () |
void | period (float seconds) |
void | period_ms (int ms) |
void | period_us (int us) |
void | pulsewidth (float seconds) |
void | pulsewidth_ms (int ms) |
void | pulsewidth_us (int us) |
PwmOut & | operator= (float value) |
PwmOut & | operator= (PwmOut &rhs) |
operator float () | |
Protected Attributes | |
pwmout_t | _pwm |
A pulse-width modulation digital output
Example
|
inline |
|
inline |
An operator shorthand for read()
|
inline |
Set the PWM period, specified in seconds (float), keeping the duty cycle the same.
|
inline |
Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same.
|
inline |
Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same.
|
inline |
Set the PWM pulsewidth, specified in seconds (float), keeping the period the same.
|
inline |
Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same.
|
inline |
Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same.
|
inline |
Return the current output duty-cycle setting, measured as a percentage (float)
|
inline |
Set the ouput duty-cycle, specified as a percentage (float)
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. |