1
0
forked from me/IronOS

Speed up accelerometer data intake.

The LIS2DH12 driver performed an unnecessary endianness conversion, as
data from the sensor was already coming in little-endian format.  The
MMA8652FC driver is now using the rev16 opcode to perform the swap
rather than doing all the bitshuffling operations in multiple steps.
This commit is contained in:
Alessandro Gatti
2019-08-29 04:03:54 +02:00
parent c96f1b528a
commit 5eb3df47df
5 changed files with 29 additions and 23 deletions

View File

@@ -34,7 +34,7 @@ public:
return static_cast<Orientation>((FRToSI2C::I2C_RegisterRead(LIS2DH_I2C_ADDRESS,LIS_INT2_SRC) >> 2) - 1);
#endif
}
static void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
static void getAxisReadings(int16_t& x, int16_t& y, int16_t& z);
private:
};