Ramtin Amin firstname.lastname@example.org [nuttx]
2018-03-17 12:06:58 UTC
I was looking at the LSM9DS1 code. this device can do combo
So the code so far creates 3 FD for each of the sensor. That is
understandable at some point, but most of the people that want the 3 sensor
want to calculate either the Euler angle or Quaternion, and at that point,
we need to get the 3 values at the same time.
So I wanted to implement a driver for MPU9250 (spi) but it is important to
be able to read all 3 values at the same time, and doing it from 3 read()
syscall ends up making it slow and have a lot of addr/value exchange, while
in a single read I could read all registers that are consecutive.
Is it acceptable to make a driver that gives you all 3 values in a single
Other option would be to offer 4 FD, 1 for each gyro/accel/compas that
would allow just reading 1 of those value. and another that does combo. ?