Skip to content

File icm20948.h

FileList > dev > icm20948.h

Go to the source code of this file

Namespaces

Type Name
namespace daisy
Hardware defines and helpers for daisy field platform.

Classes

Type Name
class Icm20948 <typename Transport>
Device support for ICM20948 IMU sensor.
struct Config
struct Icm20948Vect
class Icm20948I2CTransport
struct Config
class Icm20948SpiTransport
struct Config

Macros

Type Name
define AK09916_CNTL2 0x31
Magnetometer.
define AK09916_CNTL3 0x32
Magnetometer.
define AK09916_HXH 0x12
Magnetometer.
define AK09916_HXL 0x11
Magnetometer.
define AK09916_HYH 0x14
Magnetometer.
define AK09916_HYL 0x13
Magnetometer.
define AK09916_HZH 0x16
Magnetometer.
define AK09916_HZL 0x15
Magnetometer.
define AK09916_ST1 0x10
Magnetometer.
define AK09916_ST2 0x18
Magnetometer.
define AK09916_WIA2 0x01
Magnetometer.
define DSY_ICM20948_H
define I2C_MASTER_RESETS_BEFORE_FAIL 5
The number of times to try resetting a stuck I2C master before giving up/*#end#* /.
define ICM20948_CHIP_ID 0xEA
ICM20948 default device id from WHOAMI.
define ICM20948_I2CADDR_DEFAULT 0x69
ICM20948 default i2c address.
define ICM20948_MAG_ID 0x09
The chip ID for the magnetometer.
define ICM20948_UT_PER_LSB 0.15
mag data LSB value (fixed)
define ICM20X_B0_ACCEL_XOUT_H 0x2D
first byte of accel data
define ICM20X_B0_GYRO_XOUT_H 0x33
first byte of accel data
define ICM20X_B0_I2C_MST_STATUS 0x17
Records if I2C master bus data is finished/*#end#* /.
define ICM20X_B0_LP_CONFIG 0x05
Low Power config.
define ICM20X_B0_PWR_MGMT_1 0x06
primary power management register
define ICM20X_B0_REG_BANK_SEL 0x7F
register bank selection register
define ICM20X_B0_REG_INT_ENABLE 0x10
Interrupt enable register 0.
define ICM20X_B0_REG_INT_ENABLE_1 0x11
Interrupt enable register 1.
define ICM20X_B0_REG_INT_PIN_CFG 0xF
Interrupt config register.
define ICM20X_B0_USER_CTRL 0x03
User Control Reg. Includes I2C Master.
define ICM20X_B0_WHOAMI 0x00
Chip ID register.
define ICM20X_B2_ACCEL_CONFIG_1 0x14
Accel config for setting range.
define ICM20X_B2_ACCEL_SMPLRT_DIV_1 0x10
Accel data rate divisor MSByte.
define ICM20X_B2_ACCEL_SMPLRT_DIV_2 0x11
Accel data rate divisor LSByte.
define ICM20X_B2_GYRO_CONFIG_1 0x01
Gyro config for range setting.
define ICM20X_B2_GYRO_SMPLRT_DIV 0x00
Gyroscope data rate divisor.
define ICM20X_B3_I2C_MST_CTRL 0x1
I2C master bus config.
define ICM20X_B3_I2C_MST_DELAY_CTRL 0x2
I2C master bus config.
define ICM20X_B3_I2C_MST_ODR_CONFIG 0x0
Sets ODR for I2C master bus.
define ICM20X_B3_I2C_SLV0_ADDR 0x3
Sets I2C address for I2C master bus slave 0/*#end#* /.
define ICM20X_B3_I2C_SLV0_CTRL 0x5
Controls for I2C master bus slave 0.
define ICM20X_B3_I2C_SLV0_DO 0x6
Sets I2C master bus slave 0 data out.
define ICM20X_B3_I2C_SLV0_REG 0x4
Sets register address for I2C master bus slave 0/*#end#* /.
define ICM20X_B3_I2C_SLV4_ADDR 0x13
Sets I2C address for I2C master bus slave 4/*#end#* /.
define ICM20X_B3_I2C_SLV4_CTRL 0x15
Controls for I2C master bus slave 4.
define ICM20X_B3_I2C_SLV4_DI 0x17
Sets I2C master bus slave 4 data in.
define ICM20X_B3_I2C_SLV4_DO 0x16
Sets I2C master bus slave 4 data out.
define ICM20X_B3_I2C_SLV4_REG 0x14
Sets register address for I2C master bus slave 4/*#end#* /.
define NUM_FINISHED_CHECKS 100
How many times to poll I2C_SLV4_DONE before giving up and resetting/*#end#* /.
define SENSORS_DPS_TO_RADS (0.017453293F)
define SENSORS_GRAVITY_EARTH (9.80665F)

Macro Definition Documentation

define AK09916_CNTL2

Magnetometer.

#define AK09916_CNTL2 `0x31`


define AK09916_CNTL3

Magnetometer.

#define AK09916_CNTL3 `0x32`


define AK09916_HXH

Magnetometer.

#define AK09916_HXH `0x12`


define AK09916_HXL

Magnetometer.

#define AK09916_HXL `0x11`


define AK09916_HYH

Magnetometer.

#define AK09916_HYH `0x14`


define AK09916_HYL

Magnetometer.

#define AK09916_HYL `0x13`


define AK09916_HZH

Magnetometer.

#define AK09916_HZH `0x16`


define AK09916_HZL

Magnetometer.

#define AK09916_HZL `0x15`


define AK09916_ST1

Magnetometer.

#define AK09916_ST1 `0x10`


define AK09916_ST2

Magnetometer.

#define AK09916_ST2 `0x18`


define AK09916_WIA2

Magnetometer.

#define AK09916_WIA2 `0x01`


define DSY_ICM20948_H

#define DSY_ICM20948_H 

define I2C_MASTER_RESETS_BEFORE_FAIL

The number of times to try resetting a stuck I2C master before giving up/*#end#* /.

#define I2C_MASTER_RESETS_BEFORE_FAIL `5`


define ICM20948_CHIP_ID

ICM20948 default device id from WHOAMI.

#define ICM20948_CHIP_ID `0xEA`


define ICM20948_I2CADDR_DEFAULT

ICM20948 default i2c address.

#define ICM20948_I2CADDR_DEFAULT `0x69`


define ICM20948_MAG_ID

The chip ID for the magnetometer.

#define ICM20948_MAG_ID `0x09`


define ICM20948_UT_PER_LSB

mag data LSB value (fixed)

#define ICM20948_UT_PER_LSB `0.15`


define ICM20X_B0_ACCEL_XOUT_H

first byte of accel data

#define ICM20X_B0_ACCEL_XOUT_H `0x2D`


define ICM20X_B0_GYRO_XOUT_H

first byte of accel data

#define ICM20X_B0_GYRO_XOUT_H `0x33`


define ICM20X_B0_I2C_MST_STATUS

Records if I2C master bus data is finished/*#end#* /.

#define ICM20X_B0_I2C_MST_STATUS `0x17`


define ICM20X_B0_LP_CONFIG

Low Power config.

#define ICM20X_B0_LP_CONFIG `0x05`


define ICM20X_B0_PWR_MGMT_1

primary power management register

#define ICM20X_B0_PWR_MGMT_1 `0x06`


define ICM20X_B0_REG_BANK_SEL

register bank selection register

#define ICM20X_B0_REG_BANK_SEL `0x7F`


define ICM20X_B0_REG_INT_ENABLE

Interrupt enable register 0.

#define ICM20X_B0_REG_INT_ENABLE `0x10`


define ICM20X_B0_REG_INT_ENABLE_1

Interrupt enable register 1.

#define ICM20X_B0_REG_INT_ENABLE_1 `0x11`


define ICM20X_B0_REG_INT_PIN_CFG

Interrupt config register.

#define ICM20X_B0_REG_INT_PIN_CFG `0xF`


define ICM20X_B0_USER_CTRL

User Control Reg. Includes I2C Master.

#define ICM20X_B0_USER_CTRL `0x03`


define ICM20X_B0_WHOAMI

Chip ID register.

#define ICM20X_B0_WHOAMI `0x00`


define ICM20X_B2_ACCEL_CONFIG_1

Accel config for setting range.

#define ICM20X_B2_ACCEL_CONFIG_1 `0x14`


define ICM20X_B2_ACCEL_SMPLRT_DIV_1

Accel data rate divisor MSByte.

#define ICM20X_B2_ACCEL_SMPLRT_DIV_1 `0x10`


define ICM20X_B2_ACCEL_SMPLRT_DIV_2

Accel data rate divisor LSByte.

#define ICM20X_B2_ACCEL_SMPLRT_DIV_2 `0x11`


define ICM20X_B2_GYRO_CONFIG_1

Gyro config for range setting.

#define ICM20X_B2_GYRO_CONFIG_1 `0x01`


define ICM20X_B2_GYRO_SMPLRT_DIV

Gyroscope data rate divisor.

#define ICM20X_B2_GYRO_SMPLRT_DIV `0x00`


define ICM20X_B3_I2C_MST_CTRL

I2C master bus config.

#define ICM20X_B3_I2C_MST_CTRL `0x1`


define ICM20X_B3_I2C_MST_DELAY_CTRL

I2C master bus config.

#define ICM20X_B3_I2C_MST_DELAY_CTRL `0x2`


define ICM20X_B3_I2C_MST_ODR_CONFIG

Sets ODR for I2C master bus.

#define ICM20X_B3_I2C_MST_ODR_CONFIG `0x0`


define ICM20X_B3_I2C_SLV0_ADDR

Sets I2C address for I2C master bus slave 0/*#end#* /.

#define ICM20X_B3_I2C_SLV0_ADDR `0x3`


define ICM20X_B3_I2C_SLV0_CTRL

Controls for I2C master bus slave 0.

#define ICM20X_B3_I2C_SLV0_CTRL `0x5`


define ICM20X_B3_I2C_SLV0_DO

Sets I2C master bus slave 0 data out.

#define ICM20X_B3_I2C_SLV0_DO `0x6`


define ICM20X_B3_I2C_SLV0_REG

Sets register address for I2C master bus slave 0/*#end#* /.

#define ICM20X_B3_I2C_SLV0_REG `0x4`


define ICM20X_B3_I2C_SLV4_ADDR

Sets I2C address for I2C master bus slave 4/*#end#* /.

#define ICM20X_B3_I2C_SLV4_ADDR `0x13`


define ICM20X_B3_I2C_SLV4_CTRL

Controls for I2C master bus slave 4.

#define ICM20X_B3_I2C_SLV4_CTRL `0x15`


define ICM20X_B3_I2C_SLV4_DI

Sets I2C master bus slave 4 data in.

#define ICM20X_B3_I2C_SLV4_DI `0x17`


define ICM20X_B3_I2C_SLV4_DO

Sets I2C master bus slave 4 data out.

#define ICM20X_B3_I2C_SLV4_DO `0x16`


define ICM20X_B3_I2C_SLV4_REG

Sets register address for I2C master bus slave 4/*#end#* /.

#define ICM20X_B3_I2C_SLV4_REG `0x14`


define NUM_FINISHED_CHECKS

How many times to poll I2C_SLV4_DONE before giving up and resetting/*#end#* /.

#define NUM_FINISHED_CHECKS `100`


define SENSORS_DPS_TO_RADS

#define SENSORS_DPS_TO_RADS `(0.017453293F)`

define SENSORS_GRAVITY_EARTH

#define SENSORS_GRAVITY_EARTH `(9.80665F)`


The documentation for this class was generated from the following file external-docs/libDaisy/src/dev/icm20948.h