aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron <cameron@soycow.org>2013-09-28 14:20:29 -0700
committerbryan newbold <bnewbold@leaflabs.com>2013-11-17 16:20:06 -0500
commit1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9 (patch)
tree838b2e66dd4faabf954f7db900156a43ea8d599b
parentceedcd8cc018ae751458e363d9dd450f9e9ce928 (diff)
downloadlibrambutan-1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9.tar.gz
librambutan-1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9.zip
Corrected example of blinking an LED with recommended API
-rw-r--r--source/lang/api/hardwaretimer.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lang/api/hardwaretimer.rst b/source/lang/api/hardwaretimer.rst
index 09245f0..b919e52 100644
--- a/source/lang/api/hardwaretimer.rst
+++ b/source/lang/api/hardwaretimer.rst
@@ -141,9 +141,9 @@ anything in ``loop()``. ::
timer.setPeriod(LED_RATE); // in microseconds
// Set up an interrupt on channel 1
- timer.setChannel1Mode(TIMER_OUTPUT_COMPARE);
+ timer.setMode(TIMER_CH1, TIMER_OUTPUT_COMPARE);
timer.setCompare(TIMER_CH1, 1); // Interrupt 1 count after each update
- timer.attachCompare1Interrupt(handler_led);
+ timer.attachInterrupt(1, handler_led);
// Refresh the timer's count, prescale, and overflow
timer.refresh();