aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/timers.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-05 17:18:25 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-06 19:30:49 -0400
commit6765e0eaf8da078195373e297acc9dff6dde7b9e (patch)
tree2132dbaa01fdab76890a0b28623be07bade16d84 /docs/source/timers.rst
parent7904a5921a75ee4f99fb2662d7b540b56d6a7cb3 (diff)
downloadlibrambutan-6765e0eaf8da078195373e297acc9dff6dde7b9e.tar.gz
librambutan-6765e0eaf8da078195373e297acc9dff6dde7b9e.zip
Putting updated HardwareTimer back into the build.
HardwareTimer was removed from the build when the timer refactor was done; this redoes it in terms of the new timer.h interface. A variety of conflicting or badly designed bits were deprecated or removed. I'm still not satisfied with this interface, as it's going to make life difficult moving forward to high-density chips, where the addition of basic timers means that the capture/compare methods won't apply in some cases. However, we need to get 0.0.10 out the door, so it'll have to do for now. The docs are up to date, and contain a warning that the Wirish API isn't stable and a recommendation to use libmaple proper.
Diffstat (limited to 'docs/source/timers.rst')
-rw-r--r--docs/source/timers.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/source/timers.rst b/docs/source/timers.rst
index cb30081..9163e69 100644
--- a/docs/source/timers.rst
+++ b/docs/source/timers.rst
@@ -45,6 +45,16 @@ event" interrupt is generated. You can configure the Maple to notify
you when this takes place, by registering an interrupt handler, which
is a function that will be called when the update event occurs.
+By default, different compare values only change the relative offsets
+between events on a single timer ("phase"). They don't control the
+frequency with which they occur. However, a common trick is to
+increment the compare value manually in the interrupt handler so that
+the event will fire again after the increment period. There can be a
+different increment value for each channel, so this trick allows
+events to be programmed at 4 different rates on a single timer. Note
+that function call overheads mean that the smallest increment rate is
+at least a few microseconds.
+
Function Reference
------------------