diff options
-rw-r--r-- | driver/accelgyro_bmi3xx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/driver/accelgyro_bmi3xx.c b/driver/accelgyro_bmi3xx.c index cf2bd0b3a2..38c23f4942 100644 --- a/driver/accelgyro_bmi3xx.c +++ b/driver/accelgyro_bmi3xx.c @@ -265,14 +265,17 @@ static void bmi3_parse_fifo_data(struct motion_sensor_t *s, * 0x8000. */ if (fifo_frame->data[fifo_index] == 0x8000) - break; + return; /* * In case the frame has been cut, FIFO was * greater than our buffer. + * When a frame is only partially read out, it + * is retransmitted at the next readout. + * No need to process it here. */ if (fifo_size < BMI3_FIFO_ENTRY) - break; + return; /* Frame is complete, but may have no data. */ fifo_size -= BMI3_FIFO_ENTRY; |