1
0
forked from me/IronOS

Create approx driver for setup

This commit is contained in:
Ben V. Brown
2021-01-04 18:22:33 +11:00
parent 0b3c6008fc
commit 0cef5f8eb6
3 changed files with 101 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/*
* MSA301.h
*
* Created on: 3 Jan 2021
* Author: Ralim
*/
#ifndef DRIVERS_MSA301_H_
#define DRIVERS_MSA301_H_
#include "I2C_Wrapper.hpp"
#include "BSP.h"
class MSA301 {
public:
//Returns true if this accelerometer is detected
static bool detect();
//Init any internal state
static bool initalize();
// Reads the I2C register and returns the orientation
static Orientation getOrientation();
//Return the x/y/z axis readings as signed int16's
static void getAxisReadings(int16_t &x, int16_t &y, int16_t &z);
private:
};
#endif /* DRIVERS_MSA301_H_ */