summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/pyb.Timer.rst
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-29 23:06:13 +0000
committerDamien George <damien.p.george@gmail.com>2016-01-29 23:06:13 +0000
commit0f87a010e331c42fe020ad2803e5a1b67065b87a (patch)
tree65a3d3d0ade3350f6823284c9d43ace30f37dc9d /docs/library/pyb.Timer.rst
parenta8a4b01af6501ff7ab61b251fc30fcf8a286f8d1 (diff)
downloadmicropython-0f87a010e331c42fe020ad2803e5a1b67065b87a.tar.gz
micropython-0f87a010e331c42fe020ad2803e5a1b67065b87a.zip
docs: Update to say that Timer(3) is free, and detail LED intensity.
Diffstat (limited to 'docs/library/pyb.Timer.rst')
-rw-r--r--docs/library/pyb.Timer.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/library/pyb.Timer.rst b/docs/library/pyb.Timer.rst
index af28fb6787..d2a299bd29 100644
--- a/docs/library/pyb.Timer.rst
+++ b/docs/library/pyb.Timer.rst
@@ -37,9 +37,13 @@ class Timer -- control internal timers
tim.callback(lambda t: ...) # set callback for update interrupt (t=tim instance)
tim.callback(None) # clear callback
- *Note:* Timer 3 is reserved for internal use. Timer 5 controls
- the servo driver, and Timer 6 is used for timed ADC/DAC reading/writing.
- It is recommended to use the other timers in your programs.
+ *Note:* Timer(2) and Timer(3) are used for PWM to set the intensity of LED(3)
+ and LED(4) respectively. But these timers are only configured for PWM if
+ the intensity of the relevant LED is set to a value between 1 and 254. If
+ the intensity feature of the LEDs is not used then these timers are free for
+ general purpose use. Similarly, Timer(5) controls the servo driver, and
+ Timer(6) is used for timed ADC/DAC reading/writing. It is recommended to
+ use the other timers in your programs.
*Note:* Memory can't be allocated during a callback (an interrupt) and so
exceptions raised within a callback don't give much information. See
@@ -56,7 +60,7 @@ Constructors
Construct a new timer object of the given id. If additional
arguments are given, then the timer is initialised by ``init(...)``.
- ``id`` can be 1 to 14, excluding 3.
+ ``id`` can be 1 to 14.
Methods
-------