diff options
| author | robert-hh <robert@hammelrath.com> | 2023-02-28 12:43:52 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-05-04 13:18:47 +1000 |
| commit | 0b3b508d1d681e705c4c228cb846d10549e644af (patch) | |
| tree | d3508ce2977ca813f61854b99a7f1da8e62aa436 /docs | |
| parent | 2ac643c15bec8c88ece0e944ce58f36d02dfd2dd (diff) | |
rp2/machine_pwm: Add support for inverting a PWM channel output.
Using the invert=True|False keyword option with the constructor or init().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/library/machine.PWM.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/library/machine.PWM.rst b/docs/library/machine.PWM.rst index d6c5de4b2..b9cf00240 100644 --- a/docs/library/machine.PWM.rst +++ b/docs/library/machine.PWM.rst @@ -24,7 +24,7 @@ Example usage:: Constructors ------------ -.. class:: PWM(dest, *, freq, duty_u16, duty_ns) +.. class:: PWM(dest, *, freq, duty_u16, duty_ns, invert) Construct and return a new PWM object using the following parameters: @@ -35,10 +35,12 @@ Constructors PWM cycle. - *duty_u16* sets the duty cycle as a ratio ``duty_u16 / 65535``. - *duty_ns* sets the pulse width in nanoseconds. + - *invert* inverts the respective output if the value is True Setting *freq* may affect other PWM objects if the objects share the same underlying PWM generator (this is hardware specific). Only one of *duty_u16* and *duty_ns* should be specified at a time. + *invert* is not available at all ports. Methods ------- |
