summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/pyb.Timer.rst14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/library/pyb.Timer.rst b/docs/library/pyb.Timer.rst
index cc7a01f580..639ae1dcd1 100644
--- a/docs/library/pyb.Timer.rst
+++ b/docs/library/pyb.Timer.rst
@@ -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.