aboutsummaryrefslogtreecommitdiff
path: root/gyro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gyro.c')
-rw-r--r--gyro.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gyro.c b/gyro.c
index 5b32314..cfadebf 100644
--- a/gyro.c
+++ b/gyro.c
@@ -149,11 +149,9 @@ bool gyroProcess () {
break;
case IDLE:
- if (shouldWakeup (WAKE_GYRO) && twr.status == TWST_OK) {
- /* new data available in device buffer and bus is free */
- const bool ret = twRequest (TWM_READ, L3GD20, L3GD20_OUTZ,
- (uint8_t *) &zval, sizeof (zval));
- assert (ret);
+ /* new data available in device buffer and bus is free */
+ if (shouldWakeup (WAKE_GYRO) && twRequest (TWM_READ, L3GD20,
+ L3GD20_OUTZ, (uint8_t *) &zval, sizeof (zval))) {
/* wakeup source is disabled by isr to prevent race condition */
state = READING;
}