From 1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 28 Sep 2013 14:20:29 -0700 Subject: Corrected example of blinking an LED with recommended API --- source/lang/api/hardwaretimer.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') 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(); -- cgit v1.2.3