249 virtual bool configureFifo(
bool enable, uint8_t watermark_samples = 16) = 0;
OperationMode
Enumeration of sensor operation modes.
GyroFullScaleRange
Enumeration of gyroscope full-scale range settings.
AccelFullScaleRange
Enumeration of accelerometer full-scale range settings.
Abstract IMU device interface for polymorphic IMU sensor implementations.
bool powerOn()
Compatibility wrapper: switch IMU to NORMAL mode.
virtual bool readAccel(AccelerometerData &out)=0
Read accelerometer data.
virtual bool isAccelEnabled()=0
Check if accelerometer is enabled.
bool powerDown()
Compatibility wrapper: switch IMU to SUSPEND mode.
virtual bool configureFifo(bool enable, uint8_t watermark_samples=16)=0
Configure the FIFO buffer.
virtual bool setAccelFullScaleRange(AccelFullScaleRange range)=0
Set accelerometer full scale range.
virtual uint8_t getChipID()=0
Get the chip ID / WHO_AM_I value.
virtual bool enableAccel()=0
Enable the accelerometer.
virtual bool enableGyro()=0
Enable the gyroscope.
virtual bool setGyroFullScaleRange(GyroFullScaleRange range)=0
Set gyroscope full scale range.
virtual bool setOperationMode(OperationMode mode)=0
Set IMU operation mode.
virtual bool readGyro(GyroscopeData &out)=0
Read gyroscope data.
virtual uint32_t getFirmwareVersion()=0
Get the firmware version.
virtual bool selfTest()=0
Perform self-test on the IMU sensor.
virtual bool setAccelOutputDataRate(float data_rate_hz)=0
Set accelerometer output data rate.
virtual float getTemperature()=0
Get the temperature reading from the sensor.
virtual ~ImuBase()=default
virtual bool isDataReady(uint8_t mask=static_cast< uint8_t >(DataReadyMask::BOTH))=0
Check if requested IMU data is available.
virtual bool reset()=0
Reset the IMU sensor to its default state.
virtual bool disableGyro()=0
Disable the gyroscope.
virtual bool disableAccel()=0
Disable the accelerometer.
virtual bool disableSyncMode()=0
Disable synchronous sampling mode.
virtual bool setGyroOutputDataRate(float data_rate_hz)=0
Set gyroscope output data rate.
virtual uint16_t readFromFifo(AccelerometerData *accel_data, uint16_t accel_count, GyroscopeData *gyro_data, uint16_t gyro_count)=0
Read data from FIFO buffer.
virtual bool readAccelRaw(int16_t &x, int16_t &y, int16_t &z)=0
Read raw accelerometer data without scaling.
virtual uint32_t getTimestamp()=0
Get the timestamp from the sensor.
virtual bool isGyroEnabled()=0
Check if gyroscope is enabled.
virtual bool readGyroRaw(int16_t &x, int16_t &y, int16_t &z)=0
Read raw gyroscope data without scaling.
virtual bool enableSyncMode()=0
Enable synchronous sampling mode.
virtual bool isPresent()=0
Check if the IMU sensor is responding.
Structure representing accelerometer data.
Structure representing gyroscope data.