diff options
author | Cameron <cameron@soycow.org> | 2013-09-28 14:20:29 -0700 |
---|---|---|
committer | bryan newbold <bnewbold@leaflabs.com> | 2013-11-17 16:20:06 -0500 |
commit | 1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9 (patch) | |
tree | 838b2e66dd4faabf954f7db900156a43ea8d599b /source/lang | |
parent | ceedcd8cc018ae751458e363d9dd450f9e9ce928 (diff) | |
download | librambutan-1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9.tar.gz librambutan-1755ff8bb5eb0f1dd2624cc31761f907e4ecc3f9.zip |
Corrected example of blinking an LED with recommended API
Diffstat (limited to 'source/lang')
-rw-r--r-- | source/lang/api/hardwaretimer.rst | 4 |
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(); |