skullc-peripherals/Peripherals/Inc/peripherals_imu.hpp
Erki 55a8efa579
All checks were successful
continuous-integration/drone/push Build is passing
Clang format pass
2021-04-03 17:49:25 +03:00

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_ */