summaryrefslogtreecommitdiff
path: root/py/objstr.h
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2022-06-05 11:03:59 +0200
committerDamien George <damien@micropython.org>2022-10-06 22:42:55 +1100
commitd693758ab28a6b25601f019db78c7f9bc213be38 (patch)
treecdedb3b88e06a3cff6ba0bfcbfbb148852430332 /py/objstr.h
parent5c7e93ec48b04a6a049cc7f2ec90230cd64ecba2 (diff)
samd/machine_pwm: Add the machine.PWM class.
Features are: - 3 to 5 different frequency groups. - Freq range of 1Hz - 24 MHz. - Duty rate stays stable on freq change. Keyword options to the PWM constructor: - device=n Select a specific PWM device. If no device is specified, a free device is chosen, if available at that pin. - freq=nnnn - duty_u16=nnnn - duty_ns=nnnn - invert=True/False Allowing two outputs on the same device/channel to have complementary signals. If both freq and duty are provided, PWM output will start immediately. Pins at the same device have the same frequency. If the PWM output number exceeds the number of channels at the PWM device, the effctive channel_no is output_no % channel_count. So with a channel count of 4, output 7 is assigned to channel 3. Pins at a certain channel have the same frequency and duty rate, but may be seperately inverted.
Diffstat (limited to 'py/objstr.h')
0 files changed, 0 insertions, 0 deletions