aboutsummaryrefslogtreecommitdiff
path: root/gyro.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-09-30 16:09:51 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-09-30 16:24:52 +0200
commit0de25bc37cddc63fbb7f83867a786eeb853aff5a (patch)
tree19f154d08580bb1efd3fe2cd1883d652def0e476 /gyro.c
parent74a2f8409f3bfb462de36bca04ad44ac65473f7b (diff)
downloadhourglass-0de25bc37cddc63fbb7f83867a786eeb853aff5a.tar.gz
hourglass-0de25bc37cddc63fbb7f83867a786eeb853aff5a.tar.bz2
hourglass-0de25bc37cddc63fbb7f83867a786eeb853aff5a.zip
Reliable reboot, idle status LED indicator
Diffstat (limited to 'gyro.c')
-rw-r--r--gyro.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gyro.c b/gyro.c
index fdf2d1f..ac9ec1c 100644
--- a/gyro.c
+++ b/gyro.c
@@ -17,6 +17,7 @@
#define L3GD20_CTRLREG1 0x20
#define L3GD20_CTRLREG3 0x22
#define L3GD20_CTRLREG4 0x23
+#define L3GD20_CTRLREG5 0x24
#define L3GD20_OUTZ 0x2c
/* raw z value */
@@ -65,6 +66,7 @@ void gyroStart () {
puts ("cannot start write");
}
sleepwhile (twr.status == TWST_WAIT);
+ assert (twr.status == TWST_OK);
puts ("gyroStart done");
disableWakeup (WAKE_I2C);
}