aboutsummaryrefslogtreecommitdiff
path: root/accel.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel.c')
-rw-r--r--accel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel.c b/accel.c
index 127cc0f..bd73043 100644
--- a/accel.c
+++ b/accel.c
@@ -167,7 +167,7 @@ bool accelProcess () {
reading = false;
}
} else {
- if (!((PINC >> PINC1) & 0x1) && twr.status != TWST_WAIT) {
+ if (!((PINC >> PINC1) & 0x1) && twr.status == TWST_OK) {
/* new data available in device buffer and bus is free */
if (!twRequest (TWM_READ, LIS302DL, LIS302DL_OUTZ,
(uint8_t *) &zval, sizeof (zval))) {