skullc-peripherals/Peripherals/Inc/peripherals_imu.hpp

40 lines
606 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;
};
}
#endif /* PERIPHERALS_IMU_HPP_ */