aboutsummaryrefslogtreecommitdiff
path: root/accel.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 /accel.c
parent74a2f8409f3bfb462de36bca04ad44ac65473f7b (diff)
downloadhourglass-0de25bc37cddc63fbb7f83867a786eeb853aff5a.tar.gz
hourglass-0de25bc37cddc63fbb7f83867a786eeb853aff5a.tar.bz2
hourglass-0de25bc37cddc63fbb7f83867a786eeb853aff5a.zip
Reliable reboot, idle status LED indicator
Diffstat (limited to 'accel.c')
-rw-r--r--accel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel.c b/accel.c
index ed2aa81..6d6d9d2 100644
--- a/accel.c
+++ b/accel.c
@@ -15,6 +15,7 @@
/* registers */
#define LIS302DL_WHOAMI 0xf
#define LIS302DL_CTRLREG1 0x20
+#define LIS302DL_CTRLREG2 0x21
#define LIS302DL_UNUSED1 0x28
#define LIS302DL_OUTZ 0x2D
@@ -84,6 +85,7 @@ void accelStart () {
puts ("cannot start write");
}
sleepwhile (twr.status == TWST_WAIT);
+ assert (twr.status == TWST_OK);
puts ("accelStart done");
disableWakeup (WAKE_I2C);
}