Retrieve a Buffer of Data from BMI160

Sorry if I’m late to the party, but we had pretty much the same requirement of needing chunks of data from the accelerometer instead of single samples.

I tried David’s bmi160_fifo branch, but wasn’t very familiar with IIO so ended up ditching that effort. Instead I switched to using the BMI160’s onboard FIFO to get a thousand samples every 250ms. You can tie the FIFO interrupt to your application so you know exactly when the FIFO’s full. I switched out the kernel module for BMI160 and instead used a user space driver from Bosch https://github.com/BoschSensortec/BMI160_driver to achieve this.