summaryrefslogtreecommitdiff
path: root/blink
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-05-22 16:10:31 +0000
committerChristian Pointner <equinox@spreadspace.org>2012-05-22 16:10:31 +0000
commitf5b0085bf5b940be3aa3e7121d3139b7e5f62226 (patch)
tree55632f95b92c39570d7b97edd2e83b3f7bb764e4 /blink
parentbetter way for CPU_RPESCALE (diff)
improved CPU_PRESCALE macro
git-svn-id: https://svn.spreadspace.org/avr/trunk@27 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'blink')
-rw-r--r--blink/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blink/util.c b/blink/util.c
index 6547368..3bf17b1 100644
--- a/blink/util.c
+++ b/blink/util.c
@@ -24,7 +24,7 @@
#include "util.h"
#if defined(CLKPR)
-#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+#define CPU_PRESCALE(n) do { CLKPR = 0x80; CLKPR = (n); } while(0)
#else
#define CPU_PRESCALE(n)
#endif