Files
motor/Common/spi/InertialSensor_BMI055.h
T
2024-09-26 22:32:20 +08:00

28 lines
613 B
C

#ifndef __INERTIALSENSOR_BMI055_H__
#define __INERTIALSENSOR_BMI055_H__
#include "SPIDevice.h"
typedef struct {
SPI_DEV_t* dev_accel;
SPI_DEV_t* dev_gyro;
uint32_t accel_error_count;
uint32_t gyro_error_count;
int temperature_counter;
float accel[3];
float gyro[3];
float temp_degc;
const char *name;
bool success;
}InertialSensor_BMI055_t;
bool InertialSensor_BMI055_init(InertialSensor_BMI055_t *imu, const char *name, SPI_DEV_t* dev_accel, SPI_DEV_t* dev_gyro);
void InertialSensor_BMI055_update(InertialSensor_BMI055_t *imu);
#endif /* __INERTIALSENSOR_BMI055_H__ */