39 lines
644 B
C++
39 lines
644 B
C++
/*
|
|
* peripherals_imu.hpp
|
|
*
|
|
* Created on: Mar 5, 2021
|
|
* Author: erki
|
|
*/
|
|
|
|
#ifndef PERIPHERALS_IMU_HPP_
|
|
#define PERIPHERALS_IMU_HPP_
|
|
|
|
#include <cstdint>
|
|
|
|
namespace Peripherals
|
|
{
|
|
|
|
class IImu
|
|
{
|
|
public:
|
|
enum class Axis : std::uint32_t
|
|
{
|
|
X = 0,
|
|
Y,
|
|
Z
|
|
};
|
|
|
|
virtual void Setup() = 0;
|
|
virtual void Calibrate(const std::uint32_t samples) = 0;
|
|
|
|
virtual void ReadGyro(float* output) = 0;
|
|
virtual void ReadGyroRaw(std::int16_t* output) = 0;
|
|
|
|
virtual void ReadAccelerometer(float* output) = 0;
|
|
virtual void ReadAccelerometerRaw(std::int16_t* output) = 0;
|
|
};
|
|
|
|
}// namespace Peripherals
|
|
|
|
#endif /* PERIPHERALS_IMU_HPP_ */
|