aboutsummaryrefslogtreecommitdiff
path: root/gyro.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-03-10 17:30:31 +0100
committerLars-Dominik Braun <lars@6xq.net>2014-04-22 16:51:13 +0200
commit24d11d4976062e965fb64861808548c39f53714b (patch)
tree5fbfcc1722d163647c0ce0c395c6e5a1794fc7d4 /gyro.c
parente69b2bc45ff0940b475a1832d25e051240fbda32 (diff)
downloadhourglass-24d11d4976062e965fb64861808548c39f53714b.tar.gz
hourglass-24d11d4976062e965fb64861808548c39f53714b.tar.bz2
hourglass-24d11d4976062e965fb64861808548c39f53714b.zip
Add common.h
Diffstat (limited to 'gyro.c')
-rw-r--r--gyro.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gyro.c b/gyro.c
index d6a8b48..bbcb0fe 100644
--- a/gyro.c
+++ b/gyro.c
@@ -1,3 +1,5 @@
+#include "common.h"
+
#include <stdio.h>
#include <string.h>
#include <avr/io.h>
@@ -27,11 +29,6 @@
#define L3GD20_CTRLREG3 0x22
#define L3GD20_CTRLREG4 0x23
-#define sleepwhile(cond) \
- sleep_enable (); \
- while (cond) { sleep_cpu (); } \
- sleep_disable ();
-
/* the first interrupt is lost */
static volatile bool drdy = true;
static volatile int16_t val[3] = {0, 0, 0};