initial commit

This commit is contained in:
Lars Wilko Sentse
2024-06-11 15:30:38 +02:00
commit 19415d1ada
4 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#ifndef STA_DRIVERS_BMI088_HPP
#define STA_DRIVERS_BMI088_HPP
#include <sta/devices/stm32/bus/spi.hpp>
#include <sta/drivers/BMI088_defs.hpp>
namespace sta
{
class BMI088
{
public:
BMI088(STM32SPIDevice* gyro_device, STM32SPIDevice* accel_device);
bool init();
private:
enum Part{
GYROSCOPE,
ACCELEROMETER
};
bool busRead(Part part, uint8_t reg, uint8_t * buffer, size_t length);
bool busWrite(Part part, uint8_t reg, uint8_t * buffer, size_t length);
private:
Device * gyro_device, accel_device;
};
} // namespace sta
#endif // STA_DRIVERS_BMI088_HPP