skullc-peripherals/Peripherals/Inc/peripherals_imu.hpp
2021-03-12 17:07:18 +02:00

43 lines
758 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;
virtual float ProcessGyroReading(const std::int16_t raw_reading) = 0;
virtual float ProcessAccelerometerReading(const std::int16_t raw_reading) = 0;
};
}
#endif /* PERIPHERALS_IMU_HPP_ */