mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-bmi088.git
synced 2025-06-10 02:26:00 +00:00
initial commit
This commit is contained in:
commit
19415d1ada
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# driver-MC3419
|
||||
|
||||
Driver for the BMI088 inertial measurement unit and gyroscope
|
||||
|
||||
This driver is currently incomplete and untested
|
30
include/sta/drivers/bmi088.hpp
Normal file
30
include/sta/drivers/bmi088.hpp
Normal 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
|
6
include/sta/drivers/bmi088_defs.hpp
Normal file
6
include/sta/drivers/bmi088_defs.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef STA_DRIVERS_BMI088_DEFS_HPP
|
||||
#define STA_DRIVERS_BMI088_DEFS_HPP
|
||||
|
||||
//TODO
|
||||
|
||||
#endif // STA_DRIVERS_BMI088_DEFS_HPP
|
27
src/bmi088.cpp
Normal file
27
src/bmi088.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include <sta/drivers/BMI088.hpp>
|
||||
|
||||
#include <sta/debug/assert.hpp>
|
||||
|
||||
namespace sta
|
||||
{
|
||||
BMI088::BMI088(STM32SPIDevice* gyro_device, STM32SPIDevice* accel_device)
|
||||
: gyro_device{gyro_device}, accel_device(accel_device)
|
||||
{
|
||||
STA_ASSERT(device != nullptr);
|
||||
}
|
||||
|
||||
bool BMI088::init()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BMI088::busRead(Part part, uint8_t reg, uint8_t * buffer, size_t length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BMI088::busWrite(Part part, uint8_t reg, uint8_t * buffer, size_t length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // namespace sta
|
Loading…
x
Reference in New Issue
Block a user