[gnoduino: 16/237] Moving TCCR1B reset into #ifdef check.
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino: 16/237] Moving TCCR1B reset into #ifdef check.
- Date: Sat, 31 Mar 2012 20:16:10 +0000 (UTC)
commit 8ae68e754f8768a4253f990d596d902c545e1d38
Author: David A. Mellis <d mellis arduino cc>
Date: Sun Mar 6 11:29:35 2011 -0500
Moving TCCR1B reset into #ifdef check.
arduino/cores/arduino/wiring.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/arduino/cores/arduino/wiring.c b/arduino/cores/arduino/wiring.c
index b90d07e..ce4cad6 100755
--- a/arduino/cores/arduino/wiring.c
+++ b/arduino/cores/arduino/wiring.c
@@ -212,10 +212,10 @@ void init()
// note, however, that fast pwm mode can achieve a frequency of up
// 8 MHz (with a 16 MHz clock) at 50% duty cycle
+#if defined(TCCR1B) && defined(CS11) && defined(CS10)
TCCR1B = 0;
// set timer 1 prescale factor to 64
-#if defined(TCCR1B) && defined(CS11) && defined(CS10)
sbi(TCCR1B, CS11);
sbi(TCCR1B, CS10);
#elif defined(TCCR1) && defined(CS11) && defined(CS10)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]