docs/library/pyb.Timer: Document `brk` argument and its constants.

pull/9310/head
Howard Lovatt 2020-10-10 08:35:50 +11:00 zatwierdzone przez Damien George
rodzic a565811f23
commit 89e1e67748
1 zmienionych plików z 13 dodań i 1 usunięć

Wyświetl plik

@ -62,7 +62,7 @@ Constructors
Methods
-------
.. method:: Timer.init(*, freq, prescaler, period, mode=Timer.UP, div=1, callback=None, deadtime=0)
.. method:: Timer.init(*, freq, prescaler, period, mode=Timer.UP, div=1, callback=None, deadtime=0, brk=Timer.BRK_OFF)
Initialise the timer. Initialisation must be either by frequency (in Hz)
or by prescaler and period::
@ -107,6 +107,12 @@ Methods
measures ticks of ``source_freq`` divided by ``div`` clock ticks.
``deadtime`` is only available on timers 1 and 8.
- ``brk`` - specifies if the break mode is used to kill the output of
the PWM when the ``BRK_IN`` input is asserted. The value of this
argument determines if break is enabled and what the polarity is, and
can be one of ``Timer.BRK_OFF``, ``Timer.BRK_LOW`` or
``Timer.BRK_HIGH``.
You must either specify freq or both of period and prescaler.
.. method:: Timer.deinit()
@ -271,3 +277,9 @@ Constants
Timer.CENTER
Configures the timer to count Up, Down, or from 0 to ARR and then back down to 0.
.. data:: Timer.BRK_OFF
Timer.BRK_LOW
Timer.BRK_HIGH
Configures the break mode when passed to the ``brk`` keyword argument.