JeVois  1.17
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
jevois::IMUi2c Class Reference

#include <jevois/Core/IMUi2c.H>

IMU with I2C interface shared with camera sensor, such as ICM20948 on JeVois-A33 AR0135 camera sensor board.

Definition at line 28 of file IMUi2c.H.

Inheritance diagram for jevois::IMUi2c:
Collaboration diagram for jevois::IMUi2c:

Public Member Functions

 IMUi2c (std::shared_ptr< Camera > cam)
 Constructor. More...
 
virtual ~IMUi2c ()
 Destructor. More...
 
virtual bool isSPI () const override
 Returns true if we use SPI for transfers. Used when ICM20948_REG_USER_CTRL is written to. More...
 
Access functions for IMU registers
void writeRegister (unsigned short reg, unsigned char val) override
 Write a value to one of the IMU registers. More...
 
unsigned char readRegister (unsigned short reg) override
 Read a value from one of the camera's IMU registers. More...
 
void writeRegisterArray (unsigned short reg, unsigned char const *vals, size_t num) override
 Write an array of values to the camera's IMU registers. More...
 
void readRegisterArray (unsigned short reg, unsigned char *vals, size_t num) override
 Read an array of values from the camera's IMU registers. More...
 
- Public Member Functions inherited from jevois::IMU
 IMU ()
 Constructor. More...
 
virtual ~IMU ()
 Destructor. More...
 
void loadDMPfirmware (bool verify=false, bool errthrow=false)
 Load the DMP firmware. More...
 
void writeDMPregister (unsigned short reg, unsigned short val)
 Write a value to a DMP register. More...
 
unsigned short readDMPregister (unsigned short reg)
 Read a value from a DMP register. More...
 
void writeDMPregisterArray (unsigned short reg, unsigned char const *vals, size_t num)
 Write an array of values to DMP registers. More...
 
void readDMPregisterArray (unsigned short reg, unsigned char *vals, size_t num)
 Read an array of values from DMP registers. More...
 

Constructor & Destructor Documentation

◆ IMUi2c()

jevois::IMUi2c::IMUi2c ( std::shared_ptr< Camera cam)

Constructor.

Definition at line 35 of file IMUi2c.C.

◆ ~IMUi2c()

jevois::IMUi2c::~IMUi2c ( )
virtual

Destructor.

Definition at line 40 of file IMUi2c.C.

Member Function Documentation

◆ isSPI()

bool jevois::IMUi2c::isSPI ( ) const
overridevirtual

Returns true if we use SPI for transfers. Used when ICM20948_REG_USER_CTRL is written to.

Implements jevois::IMU.

Definition at line 44 of file IMUi2c.C.

◆ readRegister()

unsigned char jevois::IMUi2c::readRegister ( unsigned short  reg)
overridevirtual

Read a value from one of the camera's IMU registers.

See base class jevois::IMU for full docs.

Implements jevois::IMU.

Definition at line 79 of file IMUi2c.C.

References LDEBUG.

◆ readRegisterArray()

void jevois::IMUi2c::readRegisterArray ( unsigned short  reg,
unsigned char *  vals,
size_t  num 
)
overridevirtual

Read an array of values from the camera's IMU registers.

See base class jevois::IMU for full docs.

Implements jevois::IMU.

Definition at line 118 of file IMUi2c.C.

References LDEBUG, and LFATAL.

◆ writeRegister()

void jevois::IMUi2c::writeRegister ( unsigned short  reg,
unsigned char  val 
)
overridevirtual

Write a value to one of the IMU registers.

See base class jevois::IMU for full docs.

Implements jevois::IMU.

Definition at line 62 of file IMUi2c.C.

References LDEBUG.

◆ writeRegisterArray()

void jevois::IMUi2c::writeRegisterArray ( unsigned short  reg,
unsigned char const *  vals,
size_t  num 
)
overridevirtual

Write an array of values to the camera's IMU registers.

See base class jevois::IMU for full docs.

Implements jevois::IMU.

Definition at line 96 of file IMUi2c.C.

References LDEBUG, and LFATAL.


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