JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
ICM_20948 Class Reference

#include </lab/itti/jevois/software/jevois/SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.13/src/ICM_20948.h>

Definition at line 20 of file ICM_20948.h.

Inheritance diagram for ICM_20948:
Collaboration diagram for ICM_20948:

Public Member Functions

 ICM_20948 ()
 
void enableDebugging (Stream &debugPort=Serial)
 
void disableDebugging (void)
 
void debugPrintStatus (ICM_20948_Status_e stat)
 
void debugPrint (const char *)
 
void debugPrint (const __FlashStringHelper *)
 
void debugPrintln (const char *)
 
void debugPrintln (const __FlashStringHelper *)
 
void doDebugPrint (char(*)(const char *), const char *, bool newLine=false)
 
void debugPrintf (int i)
 
void debugPrintf (float f)
 
ICM_20948_AGMT_t getAGMT (void)
 
float magX (void)
 
float magY (void)
 
float magZ (void)
 
float accX (void)
 
float accY (void)
 
float accZ (void)
 
float gyrX (void)
 
float gyrY (void)
 
float gyrZ (void)
 
float temp (void)
 
const char * statusString (ICM_20948_Status_e stat=ICM_20948_Stat_NUM)
 
ICM_20948_Status_e setBank (uint8_t bank)
 
ICM_20948_Status_e swReset (void)
 
ICM_20948_Status_e sleep (bool on=false)
 
ICM_20948_Status_e lowPower (bool on=true)
 
ICM_20948_Status_e setClockSource (ICM_20948_PWR_MGMT_1_CLKSEL_e source)
 
ICM_20948_Status_e checkID (void)
 
bool dataReady (void)
 
uint8_t getWhoAmI (void)
 
bool isConnected (void)
 
ICM_20948_Status_e setSampleMode (uint8_t sensor_id_bm, uint8_t lp_config_cycle_mode)
 
ICM_20948_Status_e setFullScale (uint8_t sensor_id_bm, ICM_20948_fss_t fss)
 
ICM_20948_Status_e setDLPFcfg (uint8_t sensor_id_bm, ICM_20948_dlpcfg_t cfg)
 
ICM_20948_Status_e enableDLPF (uint8_t sensor_id_bm, bool enable)
 
ICM_20948_Status_e setSampleRate (uint8_t sensor_id_bm, ICM_20948_smplrt_t smplrt)
 
ICM_20948_Status_e clearInterrupts (void)
 
ICM_20948_Status_e cfgIntActiveLow (bool active_low)
 
ICM_20948_Status_e cfgIntOpenDrain (bool open_drain)
 
ICM_20948_Status_e cfgIntLatch (bool latching)
 
ICM_20948_Status_e cfgIntAnyReadToClear (bool enabled)
 
ICM_20948_Status_e cfgFsyncActiveLow (bool active_low)
 
ICM_20948_Status_e cfgFsyncIntMode (bool interrupt_mode)
 
ICM_20948_Status_e intEnableI2C (bool enable)
 
ICM_20948_Status_e intEnableDMP (bool enable)
 
ICM_20948_Status_e intEnablePLL (bool enable)
 
ICM_20948_Status_e intEnableWOM (bool enable)
 
ICM_20948_Status_e intEnableWOF (bool enable)
 
ICM_20948_Status_e intEnableRawDataReady (bool enable)
 
ICM_20948_Status_e intEnableOverflowFIFO (uint8_t bm_enable)
 
ICM_20948_Status_e intEnableWatermarkFIFO (uint8_t bm_enable)
 
ICM_20948_Status_e WOMLogic (uint8_t enable, uint8_t mode)
 
ICM_20948_Status_e WOMThreshold (uint8_t threshold)
 
ICM_20948_Status_e i2cMasterPassthrough (bool passthrough=true)
 
ICM_20948_Status_e i2cMasterEnable (bool enable=true)
 
ICM_20948_Status_e i2cMasterReset ()
 
ICM_20948_Status_e i2cControllerConfigurePeripheral (uint8_t peripheral, uint8_t addr, uint8_t reg, uint8_t len, bool Rw=true, bool enable=true, bool data_only=false, bool grp=false, bool swap=false, uint8_t dataOut=0)
 
ICM_20948_Status_e i2cControllerPeriph4Transaction (uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len, bool Rw, bool send_reg_addr=true)
 
ICM_20948_Status_e i2cMasterConfigureSlave (uint8_t peripheral, uint8_t addr, uint8_t reg, uint8_t len, bool Rw=true, bool enable=true, bool data_only=false, bool grp=false, bool swap=false)
 
ICM_20948_Status_e i2cMasterSLV4Transaction (uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len, bool Rw, bool send_reg_addr=true)
 
ICM_20948_Status_e i2cMasterSingleW (uint8_t addr, uint8_t reg, uint8_t data)
 
uint8_t i2cMasterSingleR (uint8_t addr, uint8_t reg)
 
ICM_20948_Status_e startupDefault (bool minimal=false)
 
ICM_20948_Status_e read (uint8_t reg, uint8_t *pdata, uint32_t len)
 
ICM_20948_Status_e write (uint8_t reg, uint8_t *pdata, uint32_t len)
 
ICM_20948_Status_e startupMagnetometer (bool minimal=false)
 
ICM_20948_Status_e magWhoIAm (void)
 
uint8_t readMag (AK09916_Reg_Addr_e reg)
 
ICM_20948_Status_e writeMag (AK09916_Reg_Addr_e reg, uint8_t *pdata)
 
ICM_20948_Status_e resetMag ()
 
ICM_20948_Status_e enableFIFO (bool enable=true)
 
ICM_20948_Status_e resetFIFO (void)
 
ICM_20948_Status_e setFIFOmode (bool snapshot=false)
 
ICM_20948_Status_e getFIFOcount (uint16_t *count)
 
ICM_20948_Status_e readFIFO (uint8_t *data, uint8_t len=1)
 
ICM_20948_Status_e setBiasGyroX (int32_t newValue)
 
ICM_20948_Status_e setBiasGyroY (int32_t newValue)
 
ICM_20948_Status_e setBiasGyroZ (int32_t newValue)
 
ICM_20948_Status_e getBiasGyroX (int32_t *bias)
 
ICM_20948_Status_e getBiasGyroY (int32_t *bias)
 
ICM_20948_Status_e getBiasGyroZ (int32_t *bias)
 
ICM_20948_Status_e setBiasAccelX (int32_t newValue)
 
ICM_20948_Status_e setBiasAccelY (int32_t newValue)
 
ICM_20948_Status_e setBiasAccelZ (int32_t newValue)
 
ICM_20948_Status_e getBiasAccelX (int32_t *bias)
 
ICM_20948_Status_e getBiasAccelY (int32_t *bias)
 
ICM_20948_Status_e getBiasAccelZ (int32_t *bias)
 
ICM_20948_Status_e setBiasCPassX (int32_t newValue)
 
ICM_20948_Status_e setBiasCPassY (int32_t newValue)
 
ICM_20948_Status_e setBiasCPassZ (int32_t newValue)
 
ICM_20948_Status_e getBiasCPassX (int32_t *bias)
 
ICM_20948_Status_e getBiasCPassY (int32_t *bias)
 
ICM_20948_Status_e getBiasCPassZ (int32_t *bias)
 
ICM_20948_Status_e enableDMP (bool enable=true)
 
ICM_20948_Status_e resetDMP (void)
 
ICM_20948_Status_e loadDMPFirmware (void)
 
ICM_20948_Status_e setDMPstartAddress (unsigned short address=DMP_START_ADDRESS)
 
ICM_20948_Status_e enableDMPSensor (enum inv_icm20948_sensor sensor, bool enable=true)
 
ICM_20948_Status_e enableDMPSensorInt (enum inv_icm20948_sensor sensor, bool enable=true)
 
ICM_20948_Status_e writeDMPmems (unsigned short reg, unsigned int length, const unsigned char *data)
 
ICM_20948_Status_e readDMPmems (unsigned short reg, unsigned int length, unsigned char *data)
 
ICM_20948_Status_e setDMPODRrate (enum DMP_ODR_Registers odr_reg, int interval)
 
ICM_20948_Status_e readDMPdataFromFIFO (icm_20948_DMP_data_t *data)
 
ICM_20948_Status_e setGyroSF (unsigned char div, int gyro_level)
 
ICM_20948_Status_e initializeDMP (void) __attribute__((weak))
 

Public Attributes

ICM_20948_AGMT_t agmt
 
ICM_20948_Status_e status
 

Protected Member Functions

float getTempC (int16_t val)
 
float getGyrDPS (int16_t axis_val)
 
float getAccMG (int16_t axis_val)
 
float getMagUT (int16_t axis_val)
 

Protected Attributes

ICM_20948_Device_t _device
 

Constructor & Destructor Documentation

◆ ICM_20948()

ICM_20948::ICM_20948 ( )

Member Function Documentation

◆ accX()

float ICM_20948::accX ( void  )

◆ accY()

float ICM_20948::accY ( void  )

◆ accZ()

float ICM_20948::accZ ( void  )

◆ cfgFsyncActiveLow()

ICM_20948_Status_e ICM_20948::cfgFsyncActiveLow ( bool  active_low)

◆ cfgFsyncIntMode()

ICM_20948_Status_e ICM_20948::cfgFsyncIntMode ( bool  interrupt_mode)

◆ cfgIntActiveLow()

ICM_20948_Status_e ICM_20948::cfgIntActiveLow ( bool  active_low)

◆ cfgIntAnyReadToClear()

ICM_20948_Status_e ICM_20948::cfgIntAnyReadToClear ( bool  enabled)

◆ cfgIntLatch()

ICM_20948_Status_e ICM_20948::cfgIntLatch ( bool  latching)

◆ cfgIntOpenDrain()

ICM_20948_Status_e ICM_20948::cfgIntOpenDrain ( bool  open_drain)

◆ checkID()

ICM_20948_Status_e ICM_20948::checkID ( void  )

◆ clearInterrupts()

ICM_20948_Status_e ICM_20948::clearInterrupts ( void  )

◆ dataReady()

bool ICM_20948::dataReady ( void  )

◆ debugPrint() [1/2]

void ICM_20948::debugPrint ( const __FlashStringHelper *  )

◆ debugPrint() [2/2]

void ICM_20948::debugPrint ( const char *  )

◆ debugPrintf() [1/2]

void ICM_20948::debugPrintf ( float  f)

◆ debugPrintf() [2/2]

void ICM_20948::debugPrintf ( int  i)

◆ debugPrintln() [1/2]

void ICM_20948::debugPrintln ( const __FlashStringHelper *  )

◆ debugPrintln() [2/2]

void ICM_20948::debugPrintln ( const char *  )

◆ debugPrintStatus()

void ICM_20948::debugPrintStatus ( ICM_20948_Status_e  stat)

◆ disableDebugging()

void ICM_20948::disableDebugging ( void  )

◆ doDebugPrint()

void ICM_20948::doDebugPrint ( char(*)(const char *)  ,
const char *  ,
bool  newLine = false 
)

◆ enableDebugging()

void ICM_20948::enableDebugging ( Stream &  debugPort = Serial)

◆ enableDLPF()

ICM_20948_Status_e ICM_20948::enableDLPF ( uint8_t  sensor_id_bm,
bool  enable 
)

◆ enableDMP()

ICM_20948_Status_e ICM_20948::enableDMP ( bool  enable = true)

◆ enableDMPSensor()

ICM_20948_Status_e ICM_20948::enableDMPSensor ( enum inv_icm20948_sensor  sensor,
bool  enable = true 
)

◆ enableDMPSensorInt()

ICM_20948_Status_e ICM_20948::enableDMPSensorInt ( enum inv_icm20948_sensor  sensor,
bool  enable = true 
)

◆ enableFIFO()

ICM_20948_Status_e ICM_20948::enableFIFO ( bool  enable = true)

◆ getAccMG()

float ICM_20948::getAccMG ( int16_t  axis_val)
protected

◆ getAGMT()

ICM_20948_AGMT_t ICM_20948::getAGMT ( void  )

◆ getBiasAccelX()

ICM_20948_Status_e ICM_20948::getBiasAccelX ( int32_t *  bias)

◆ getBiasAccelY()

ICM_20948_Status_e ICM_20948::getBiasAccelY ( int32_t *  bias)

◆ getBiasAccelZ()

ICM_20948_Status_e ICM_20948::getBiasAccelZ ( int32_t *  bias)

◆ getBiasCPassX()

ICM_20948_Status_e ICM_20948::getBiasCPassX ( int32_t *  bias)

◆ getBiasCPassY()

ICM_20948_Status_e ICM_20948::getBiasCPassY ( int32_t *  bias)

◆ getBiasCPassZ()

ICM_20948_Status_e ICM_20948::getBiasCPassZ ( int32_t *  bias)

◆ getBiasGyroX()

ICM_20948_Status_e ICM_20948::getBiasGyroX ( int32_t *  bias)

◆ getBiasGyroY()

ICM_20948_Status_e ICM_20948::getBiasGyroY ( int32_t *  bias)

◆ getBiasGyroZ()

ICM_20948_Status_e ICM_20948::getBiasGyroZ ( int32_t *  bias)

◆ getFIFOcount()

ICM_20948_Status_e ICM_20948::getFIFOcount ( uint16_t *  count)

◆ getGyrDPS()

float ICM_20948::getGyrDPS ( int16_t  axis_val)
protected

◆ getMagUT()

float ICM_20948::getMagUT ( int16_t  axis_val)
protected

◆ getTempC()

float ICM_20948::getTempC ( int16_t  val)
protected

◆ getWhoAmI()

uint8_t ICM_20948::getWhoAmI ( void  )

◆ gyrX()

float ICM_20948::gyrX ( void  )

◆ gyrY()

float ICM_20948::gyrY ( void  )

◆ gyrZ()

float ICM_20948::gyrZ ( void  )

◆ i2cControllerConfigurePeripheral()

ICM_20948_Status_e ICM_20948::i2cControllerConfigurePeripheral ( uint8_t  peripheral,
uint8_t  addr,
uint8_t  reg,
uint8_t  len,
bool  Rw = true,
bool  enable = true,
bool  data_only = false,
bool  grp = false,
bool  swap = false,
uint8_t  dataOut = 0 
)

◆ i2cControllerPeriph4Transaction()

ICM_20948_Status_e ICM_20948::i2cControllerPeriph4Transaction ( uint8_t  addr,
uint8_t  reg,
uint8_t *  data,
uint8_t  len,
bool  Rw,
bool  send_reg_addr = true 
)

◆ i2cMasterConfigureSlave()

ICM_20948_Status_e ICM_20948::i2cMasterConfigureSlave ( uint8_t  peripheral,
uint8_t  addr,
uint8_t  reg,
uint8_t  len,
bool  Rw = true,
bool  enable = true,
bool  data_only = false,
bool  grp = false,
bool  swap = false 
)

◆ i2cMasterEnable()

ICM_20948_Status_e ICM_20948::i2cMasterEnable ( bool  enable = true)

◆ i2cMasterPassthrough()

ICM_20948_Status_e ICM_20948::i2cMasterPassthrough ( bool  passthrough = true)

◆ i2cMasterReset()

ICM_20948_Status_e ICM_20948::i2cMasterReset ( )

◆ i2cMasterSingleR()

uint8_t ICM_20948::i2cMasterSingleR ( uint8_t  addr,
uint8_t  reg 
)

◆ i2cMasterSingleW()

ICM_20948_Status_e ICM_20948::i2cMasterSingleW ( uint8_t  addr,
uint8_t  reg,
uint8_t  data 
)

◆ i2cMasterSLV4Transaction()

ICM_20948_Status_e ICM_20948::i2cMasterSLV4Transaction ( uint8_t  addr,
uint8_t  reg,
uint8_t *  data,
uint8_t  len,
bool  Rw,
bool  send_reg_addr = true 
)

◆ initializeDMP()

ICM_20948_Status_e ICM_20948::initializeDMP ( void  )

◆ intEnableDMP()

ICM_20948_Status_e ICM_20948::intEnableDMP ( bool  enable)

◆ intEnableI2C()

ICM_20948_Status_e ICM_20948::intEnableI2C ( bool  enable)

◆ intEnableOverflowFIFO()

ICM_20948_Status_e ICM_20948::intEnableOverflowFIFO ( uint8_t  bm_enable)

◆ intEnablePLL()

ICM_20948_Status_e ICM_20948::intEnablePLL ( bool  enable)

◆ intEnableRawDataReady()

ICM_20948_Status_e ICM_20948::intEnableRawDataReady ( bool  enable)

◆ intEnableWatermarkFIFO()

ICM_20948_Status_e ICM_20948::intEnableWatermarkFIFO ( uint8_t  bm_enable)

◆ intEnableWOF()

ICM_20948_Status_e ICM_20948::intEnableWOF ( bool  enable)

◆ intEnableWOM()

ICM_20948_Status_e ICM_20948::intEnableWOM ( bool  enable)

◆ isConnected()

bool ICM_20948::isConnected ( void  )

◆ loadDMPFirmware()

ICM_20948_Status_e ICM_20948::loadDMPFirmware ( void  )

◆ lowPower()

ICM_20948_Status_e ICM_20948::lowPower ( bool  on = true)

◆ magWhoIAm()

ICM_20948_Status_e ICM_20948::magWhoIAm ( void  )

◆ magX()

float ICM_20948::magX ( void  )

◆ magY()

float ICM_20948::magY ( void  )

◆ magZ()

float ICM_20948::magZ ( void  )

◆ read()

ICM_20948_Status_e ICM_20948::read ( uint8_t  reg,
uint8_t *  pdata,
uint32_t  len 
)

◆ readDMPdataFromFIFO()

ICM_20948_Status_e ICM_20948::readDMPdataFromFIFO ( icm_20948_DMP_data_t data)

◆ readDMPmems()

ICM_20948_Status_e ICM_20948::readDMPmems ( unsigned short  reg,
unsigned int  length,
unsigned char *  data 
)

◆ readFIFO()

ICM_20948_Status_e ICM_20948::readFIFO ( uint8_t *  data,
uint8_t  len = 1 
)

◆ readMag()

uint8_t ICM_20948::readMag ( AK09916_Reg_Addr_e  reg)

◆ resetDMP()

ICM_20948_Status_e ICM_20948::resetDMP ( void  )

◆ resetFIFO()

ICM_20948_Status_e ICM_20948::resetFIFO ( void  )

◆ resetMag()

ICM_20948_Status_e ICM_20948::resetMag ( )

◆ setBank()

ICM_20948_Status_e ICM_20948::setBank ( uint8_t  bank)

◆ setBiasAccelX()

ICM_20948_Status_e ICM_20948::setBiasAccelX ( int32_t  newValue)

◆ setBiasAccelY()

ICM_20948_Status_e ICM_20948::setBiasAccelY ( int32_t  newValue)

◆ setBiasAccelZ()

ICM_20948_Status_e ICM_20948::setBiasAccelZ ( int32_t  newValue)

◆ setBiasCPassX()

ICM_20948_Status_e ICM_20948::setBiasCPassX ( int32_t  newValue)

◆ setBiasCPassY()

ICM_20948_Status_e ICM_20948::setBiasCPassY ( int32_t  newValue)

◆ setBiasCPassZ()

ICM_20948_Status_e ICM_20948::setBiasCPassZ ( int32_t  newValue)

◆ setBiasGyroX()

ICM_20948_Status_e ICM_20948::setBiasGyroX ( int32_t  newValue)

◆ setBiasGyroY()

ICM_20948_Status_e ICM_20948::setBiasGyroY ( int32_t  newValue)

◆ setBiasGyroZ()

ICM_20948_Status_e ICM_20948::setBiasGyroZ ( int32_t  newValue)

◆ setClockSource()

ICM_20948_Status_e ICM_20948::setClockSource ( ICM_20948_PWR_MGMT_1_CLKSEL_e  source)

◆ setDLPFcfg()

ICM_20948_Status_e ICM_20948::setDLPFcfg ( uint8_t  sensor_id_bm,
ICM_20948_dlpcfg_t  cfg 
)

◆ setDMPODRrate()

ICM_20948_Status_e ICM_20948::setDMPODRrate ( enum DMP_ODR_Registers  odr_reg,
int  interval 
)

◆ setDMPstartAddress()

ICM_20948_Status_e ICM_20948::setDMPstartAddress ( unsigned short  address = DMP_START_ADDRESS)

◆ setFIFOmode()

ICM_20948_Status_e ICM_20948::setFIFOmode ( bool  snapshot = false)

◆ setFullScale()

ICM_20948_Status_e ICM_20948::setFullScale ( uint8_t  sensor_id_bm,
ICM_20948_fss_t  fss 
)

◆ setGyroSF()

ICM_20948_Status_e ICM_20948::setGyroSF ( unsigned char  div,
int  gyro_level 
)

◆ setSampleMode()

ICM_20948_Status_e ICM_20948::setSampleMode ( uint8_t  sensor_id_bm,
uint8_t  lp_config_cycle_mode 
)

◆ setSampleRate()

ICM_20948_Status_e ICM_20948::setSampleRate ( uint8_t  sensor_id_bm,
ICM_20948_smplrt_t  smplrt 
)

◆ sleep()

ICM_20948_Status_e ICM_20948::sleep ( bool  on = false)

◆ startupDefault()

ICM_20948_Status_e ICM_20948::startupDefault ( bool  minimal = false)

◆ startupMagnetometer()

ICM_20948_Status_e ICM_20948::startupMagnetometer ( bool  minimal = false)

◆ statusString()

const char * ICM_20948::statusString ( ICM_20948_Status_e  stat = ICM_20948_Stat_NUM)

◆ swReset()

ICM_20948_Status_e ICM_20948::swReset ( void  )

◆ temp()

float ICM_20948::temp ( void  )

◆ WOMLogic()

ICM_20948_Status_e ICM_20948::WOMLogic ( uint8_t  enable,
uint8_t  mode 
)

◆ WOMThreshold()

ICM_20948_Status_e ICM_20948::WOMThreshold ( uint8_t  threshold)

◆ write()

ICM_20948_Status_e ICM_20948::write ( uint8_t  reg,
uint8_t *  pdata,
uint32_t  len 
)

◆ writeDMPmems()

ICM_20948_Status_e ICM_20948::writeDMPmems ( unsigned short  reg,
unsigned int  length,
const unsigned char *  data 
)

◆ writeMag()

ICM_20948_Status_e ICM_20948::writeMag ( AK09916_Reg_Addr_e  reg,
uint8_t *  pdata 
)

Member Data Documentation

◆ _device

ICM_20948_Device_t ICM_20948::_device
protected

Definition at line 29 of file ICM_20948.h.

◆ agmt

ICM_20948_AGMT_t ICM_20948::agmt

Definition at line 75 of file ICM_20948.h.

◆ status

ICM_20948_Status_e ICM_20948::status

Definition at line 92 of file ICM_20948.h.


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