modm API documentation
modm::Bmi088SpiTransport< SpiMaster, AccCs, GyroCs > Class Template Reference

#include <modm/driver/inertial/bmi088_transport.hpp>

Inheritance diagram for modm::Bmi088SpiTransport< SpiMaster, AccCs, GyroCs >:
modm::Bmi088TransportBase modm::SpiDevice< SpiMaster >

Public Types

enum  AccRegister : uint8_t {
  ChipId = 0x00, Error = 0x02, Status = 0x03, DataXLow = 0x12,
  DataXHigh = 0x13, DataYLow = 0x14, DataYHigh = 0x15, DataZLow = 0x16,
  DataZHigh = 0x17, SensorTime0 = 0x18, SensorTime1 = 0x19, SensorTime2 = 0x1A,
  InterruptStatus = 0x1D, TempHigh = 0x22, TempLow = 0x23, FifoLength0 = 0x24,
  FifoLength1 = 0x25, FifoData = 0x26, Config = 0x40, Range = 0x41,
  FifoDownsampling = 0x45, FifoWatermark0 = 0x46, FifoWatermark1 = 0x47, FifoConfig0 = 0x48,
  FifoConfig1 = 0x49, Int1Control = 0x53, Int2Control = 0x54, IntMap = 0x58,
  SelfTest = 0x6D, PowerConfig = 0x7C, PowerControl = 0x7D, SoftReset = 0x7E
}
 
enum  GyroRegister : uint8_t {
  ChipId = 0x00, RateXLow = 0x02, RateXHigh = 0x03, RateYLow = 0x04,
  RateYHigh = 0x05, RateZLow = 0x06, RateZHigh = 0x07, InterruptStatus = 0x0A,
  FifoStatus = 0x0E, Range = 0x0F, Bandwidth = 0x10, LowPowerMode1 = 0x11,
  SoftReset = 0x14, InterruptControl = 0x15, Int3Int4Conf = 0x16, Int3Int4Map = 0x18,
  FifoWatermark = 0x1E, FifoExtInt = 0x34, SelfTest = 0x3C, FifoConfig0 = 0x3D,
  FifoConfig1 = 0x3E, FifoData = 0x3F
}
 

Public Member Functions

 Bmi088SpiTransport (const Bmi088SpiTransport &) = delete
 
Bmi088SpiTransport & operator= (const Bmi088SpiTransport &) = delete
 
void initialize ()
 
std::span< uint8_t > readRegisters (AccRegister startReg, uint8_t count)
 
std::span< uint8_t > readRegisters (GyroRegister startReg, uint8_t count)
 
bool writeRegister (AccRegister reg, uint8_t data)
 
bool writeRegister (GyroRegister reg, uint8_t data)
 
void attachConfigurationHandler (Spi::ConfigurationHandler handler)
 

Static Public Attributes

static constexpr uint8_t MaxRegisterSequence {6}
 

Protected Member Functions

bool acquireMaster ()
 
bool releaseMaster ()
 

Detailed Description

template<typename SpiMaster, typename AccCs, typename GyroCs>
class modm::Bmi088SpiTransport< SpiMaster, AccCs, GyroCs >

BMI088 SPI transport. Pass as template parameter to Bmi088 driver class to use the driver with SPI.

The transport class contains internal buffers which allow to read all three gyroscope or accelerometer axes in a single DMA transaction.

Template Parameters
SpiMasterSPI master the device is connected to
AccCsaccelerometer chip-select GPIO
GyroCsgyroscope chip-select GPIO

The documentation for this class was generated from the following file: