mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 05:00:26 +01:00
samd/machine_pwm: Add init() method to PWM and simplify the PWM code.
The PWM.init() method has been added. Calling init() without arguments restarts a PWM channel stopped with deinit(). Otherwise single parameters except for "device=n" can be changed again. The device can only be specified once, either in the constructor or the first init() call. Also simplify get_pwm_config() and get_adc_config(), and shrink the PWM object.
This commit is contained in:
@@ -191,7 +191,7 @@ It supports all basic methods listed for that class. ::
|
||||
PWM Constructor
|
||||
```````````````
|
||||
|
||||
.. class:: PWM(dest, freq, duty_u16, duty_ns, *, invert, device)
|
||||
.. class:: PWM(dest, *, freq, duty_u16, duty_ns, invert, device)
|
||||
:noindex:
|
||||
|
||||
Construct and return a new PWM object using the following parameters:
|
||||
|
||||
Reference in New Issue
Block a user