aboutsummaryrefslogtreecommitdiff
path: root/accel.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-02-26 14:39:30 +0100
committerLars-Dominik Braun <lars@6xq.net>2015-02-26 14:46:23 +0100
commite2e3038c627ea7460915cdd535cb91301af614a7 (patch)
tree392efd367176e57696eac7d21674b262f0cc7997 /accel.h
parent1a73da01d68d743d795830a6f7f36a083c7b6ed2 (diff)
downloadhourglass-e2e3038c627ea7460915cdd535cb91301af614a7.tar.gz
hourglass-e2e3038c627ea7460915cdd535cb91301af614a7.tar.bz2
hourglass-e2e3038c627ea7460915cdd535cb91301af614a7.zip
accel: Stop polling
Use freefall interrupts instead. This drop the fancy horizon/shake detection algorithms, but it works surprisingly well and is way more energy-efficient. Shake detection is a little too sensitive imo and horizon detection needs some tweaking too.
Diffstat (limited to 'accel.h')
-rw-r--r--accel.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/accel.h b/accel.h
index edb2540..fcaaafd 100644
--- a/accel.h
+++ b/accel.h
@@ -13,11 +13,9 @@ typedef uint8_t horizon;
void accelInit ();
void accelStart ();
void accelProcess ();
-int8_t accelGetZ ();
-int8_t accelGetNormalizedZ ();
-uint8_t accelGetShakeCount ();
+horizon accelGetHorizon (bool * const);
void accelResetShakeCount ();
-horizon accelGetHorizon ();
+uint8_t accelGetShakeCount ();
#endif /* ACCEL_H */