A pulse-width modulation digital output

  1. PwmOut (PinName pin)
    1. Create a PwmOut connected to the specified pin.
  2. void - write (float value)
    1. Set the ouput duty-cycle, specified as a percentage (float)
  3. float - read ()
    1. Return the current output duty-cycle setting, measured as a percentage (float)
  4. void - period (float seconds)
    1. Set the PWM period, specified in seconds (float), keeping the duty cycle the same.
  5. void - period_ms (int ms)
    1. Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same.
  6. void - period_us (int us)
    1. Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same.
  7. void - pulsewidth (float seconds)
    1. Set the PWM pulsewidth, specified in seconds (float), keeping the period the same.
  8. void - pulsewidth_ms (int ms)
    1. Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same.
  9. void - pulsewidth_us (int us)
    1. Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same.
  10. PwmOut & - operator= (float value)
    1. An operator shorthand for write()
  11. PwmOut & - operator float ()
    1. An operator shorthand for read()


Please log in to post comments.