diff --git a/epicardium/modules/bhi.c b/epicardium/modules/bhi.c index 5cde7442827948075b7f3e32ccd9532165ab713e..6c1d4e1930a4ad30d90bae34c438fbea93486dc1 100644 --- a/epicardium/modules/bhi.c +++ b/epicardium/modules/bhi.c @@ -340,7 +340,7 @@ bhi160_handle_packet(bhy_data_type_t data_type, bhy_data_generic_t *sensor_data) * Fetch all data available from BHI160's FIFO buffer and handle all packets * contained in it. */ -static int bhi160_fetch_fifo(void) +static void bhi160_fetch_fifo(void) { /* * Warning: The code from the BHy1 docs has some issues. This @@ -398,7 +398,6 @@ static int bhi160_fetch_fifo(void) hwlock_release(HWLOCK_I2C); mutex_unlock(&bhi160_mutex); - return result; } /* @@ -512,13 +511,7 @@ void vBhi160Task(void *pvParameters) /* ----------------------------------------- */ while (1) { - int ret = bhi160_fetch_fifo(); - if (ret == -EBUSY) { - LOG_WARN("bhi160", "Could not acquire mutex for FIFO?"); - continue; - } else if (ret < 0) { - LOG_ERR("bhi160", "Unknown error: %d", -ret); - } + bhi160_fetch_fifo(); /* * Wait for interrupt. After two seconds, fetch FIFO anyway in