Files
IronOS/workspace/TS100/Core/Inc/MMA8652FC.hpp
Alessandro Gatti 5eb3df47df 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.
2019-08-29 04:11:38 +02:00

28 lines
528 B
C++

/*
* MMA8652FC.h
*
* Created on: 31Aug.,2017
* Author: Ben V. Brown
*/
#ifndef MMA8652FC_HPP_
#define MMA8652FC_HPP_
#include "stm32f1xx_hal.h"
#include "MMA8652FC_defines.h"
#include "FRToSI2C.hpp"
#include "hardware.h"
class MMA8652FC {
public:
static void initalize(); // Initalize the system
static Orientation getOrientation();// Reads the I2C register and returns the orientation (true == left)
static void getAxisReadings(int16_t& x, int16_t& y, int16_t& z);
private:
};
#endif /* MMA8652FC_HPP_ */