summaryrefslogtreecommitdiffstatshomepage
path: root/docs/pyboard/tutorial/assembler.rst
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2023-04-27 21:21:56 +0200
committerDamien George <damien@micropython.org>2023-05-04 13:18:58 +1000
commit7952694a3cbf54ddc07268b84c45c80a8c6169e8 (patch)
tree2f296ff03a89327c6724e0bfc2dbf6a5e3fac394 /docs/pyboard/tutorial/assembler.rst
parent0b3b508d1d681e705c4c228cb846d10549e644af (diff)
downloadmicropython-7952694a3cbf54ddc07268b84c45c80a8c6169e8.tar.gz
micropython-7952694a3cbf54ddc07268b84c45c80a8c6169e8.zip
rp2/machine_pwm: Add duty_x() checks and return 0 if PWM is not started.
Changes in this commit: - Limit duty_u16() to 65535 and duty_ns() to the period duration. - Return 0 for pwm.freq() if the frequency has not been set yet. - Return 0 for pwm.duty_us16() and duty_ns() unless both frequency and duty cycle have been set. - Initialize the pin to PWM at the very end of the constructor, to avoid possible glitches on the pin when setting up the PWM.
Diffstat (limited to 'docs/pyboard/tutorial/assembler.rst')
0 files changed, 0 insertions, 0 deletions