33 IMUspi(std::string
const & devname);
39 virtual bool isSPI()
const override;
46 void writeRegister(
unsigned short reg,
unsigned char val)
override;
54 void writeRegisterArray(
unsigned short reg,
unsigned char const * vals,
size_t num)
override;
58 void readRegisterArray(
unsigned short reg,
unsigned char * vals,
size_t num)
override;
67 void spi_xfer(
unsigned char addr,
unsigned char dir,
size_t siz,
68 unsigned char * datain,
unsigned char const * dataout);
Abstract interface to an ICM20948 inertial measurement unit (IMU)
IMU with SPI interface, such as the ICM20948 IMU on the JeVois-Pro IMX290 camera sensor board.
void writeRegisterArray(unsigned short reg, unsigned char const *vals, size_t num) override
Write an array of values to the camera's IMU registers.
void writeRegister(unsigned short reg, unsigned char val) override
Write a value to one of the IMU registers.
virtual ~IMUspi()
Destructor.
virtual bool isSPI() const override
Returns true if we use SPI for transfers. Used when ICM20948_REG_USER_CTRL is written to.
unsigned char readRegister(unsigned short reg) override
Read a value from one of the camera's IMU registers.
void selectBank(unsigned short reg)
std::string const itsDevName
void readRegisterArray(unsigned short reg, unsigned char *vals, size_t num) override
Read an array of values from the camera's IMU registers.
void spi_xfer(unsigned char addr, unsigned char dir, size_t siz, unsigned char *datain, unsigned char const *dataout)
Main namespace for all JeVois classes and functions.