PX4 Firmware
PX4 Autopilot Software http://px4.io
MPU6000.hpp File Reference
#include <lib/conversion/rotation.h>
#include <lib/drivers/accelerometer/PX4Accelerometer.hpp>
#include <lib/drivers/gyroscope/PX4Gyroscope.hpp>
#include <lib/drivers/device/i2c.h>
#include <lib/drivers/device/spi.h>
#include <lib/ecl/geo/geo.h>
#include <lib/perf/perf_counter.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <systemlib/conversions.h>
#include <systemlib/px4_macros.h>
Include dependency graph for MPU6000.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MPUReport
 Report conversation within the mpu, including command byte and interrupt status. More...
 
class  MPU6000
 

Macros

#define DIR_READ   0x80
 
#define DIR_WRITE   0x00
 
#define MPUREG_WHOAMI   0x75
 
#define MPUREG_SMPLRT_DIV   0x19
 
#define MPUREG_CONFIG   0x1A
 
#define MPUREG_GYRO_CONFIG   0x1B
 
#define MPUREG_ACCEL_CONFIG   0x1C
 
#define MPUREG_FIFO_EN   0x23
 
#define MPUREG_INT_PIN_CFG   0x37
 
#define MPUREG_INT_ENABLE   0x38
 
#define MPUREG_INT_STATUS   0x3A
 
#define MPUREG_ACCEL_XOUT_H   0x3B
 
#define MPUREG_ACCEL_XOUT_L   0x3C
 
#define MPUREG_ACCEL_YOUT_H   0x3D
 
#define MPUREG_ACCEL_YOUT_L   0x3E
 
#define MPUREG_ACCEL_ZOUT_H   0x3F
 
#define MPUREG_ACCEL_ZOUT_L   0x40
 
#define MPUREG_TEMP_OUT_H   0x41
 
#define MPUREG_TEMP_OUT_L   0x42
 
#define MPUREG_GYRO_XOUT_H   0x43
 
#define MPUREG_GYRO_XOUT_L   0x44
 
#define MPUREG_GYRO_YOUT_H   0x45
 
#define MPUREG_GYRO_YOUT_L   0x46
 
#define MPUREG_GYRO_ZOUT_H   0x47
 
#define MPUREG_GYRO_ZOUT_L   0x48
 
#define MPUREG_USER_CTRL   0x6A
 
#define MPUREG_PWR_MGMT_1   0x6B
 
#define MPUREG_PWR_MGMT_2   0x6C
 
#define MPUREG_FIFO_COUNTH   0x72
 
#define MPUREG_FIFO_COUNTL   0x73
 
#define MPUREG_FIFO_R_W   0x74
 
#define MPUREG_PRODUCT_ID   0x0C
 
#define MPUREG_TRIM1   0x0D
 
#define MPUREG_TRIM2   0x0E
 
#define MPUREG_TRIM3   0x0F
 
#define MPUREG_TRIM4   0x10
 
#define MPU_GYRO_DLPF_CFG_256HZ_NOLPF2   0x00
 
#define MPU_GYRO_DLPF_CFG_188HZ   0x01
 
#define MPU_GYRO_DLPF_CFG_98HZ   0x02
 
#define MPU_GYRO_DLPF_CFG_42HZ   0x03
 
#define MPU_GYRO_DLPF_CFG_20HZ   0x04
 
#define MPU_GYRO_DLPF_CFG_10HZ   0x05
 
#define MPU_GYRO_DLPF_CFG_5HZ   0x06
 
#define MPU_GYRO_DLPF_CFG_2100HZ_NOLPF   0x07
 
#define MPU_DLPF_CFG_MASK   0x07
 
#define BIT_SLEEP   0x40
 
#define BIT_H_RESET   0x80
 
#define BITS_CLKSEL   0x07
 
#define MPU_CLK_SEL_PLLGYROX   0x01
 
#define MPU_CLK_SEL_PLLGYROZ   0x03
 
#define MPU_EXT_SYNC_GYROX   0x02
 
#define BITS_GYRO_ST_X   0x80
 
#define BITS_GYRO_ST_Y   0x40
 
#define BITS_GYRO_ST_Z   0x20
 
#define BITS_FS_250DPS   0x00
 
#define BITS_FS_500DPS   0x08
 
#define BITS_FS_1000DPS   0x10
 
#define BITS_FS_2000DPS   0x18
 
#define BITS_FS_MASK   0x18
 
#define BIT_INT_ANYRD_2CLEAR   0x10
 
#define BIT_RAW_RDY_EN   0x01
 
#define BIT_I2C_IF_DIS   0x10
 
#define BIT_INT_STATUS_DATA   0x01
 
#define MPU_WHOAMI_6000   0x68
 
#define ICM_WHOAMI_20602   0x12
 
#define ICM_WHOAMI_20608   0xaf
 
#define ICM_WHOAMI_20689   0x98
 
#define ICMREG_ACCEL_CONFIG2   0x1D
 
#define ICM_ACC_DLPF_CFG_1046HZ_NOLPF   0x00
 
#define ICM_ACC_DLPF_CFG_218HZ   0x01
 
#define ICM_ACC_DLPF_CFG_99HZ   0x02
 
#define ICM_ACC_DLPF_CFG_44HZ   0x03
 
#define ICM_ACC_DLPF_CFG_21HZ   0x04
 
#define ICM_ACC_DLPF_CFG_10HZ   0x05
 
#define ICM_ACC_DLPF_CFG_5HZ   0x06
 
#define ICM_ACC_DLPF_CFG_420HZ   0x07
 
#define MPUREG_ICM_UNDOC1   0x11
 
#define MPUREG_ICM_UNDOC1_VALUE   0xc9
 
#define ICM20602_REV_01   1
 
#define ICM20602_REV_02   2
 
#define ICM20608_REV_FF   0xff
 
#define ICM20689_REV_FE   0xfe
 
#define ICM20689_REV_03   0x03
 
#define ICM20689_REV_04   0x04
 
#define MPU6000ES_REV_C4   0x14
 
#define MPU6000ES_REV_C5   0x15
 
#define MPU6000ES_REV_D6   0x16
 
#define MPU6000ES_REV_D7   0x17
 
#define MPU6000ES_REV_D8   0x18
 
#define MPU6000_REV_C4   0x54
 
#define MPU6000_REV_C5   0x55
 
#define MPU6000_REV_D6   0x56
 
#define MPU6000_REV_D7   0x57
 
#define MPU6000_REV_D8   0x58
 
#define MPU6000_REV_D9   0x59
 
#define MPU6000_REV_D10   0x5A
 
#define MPU6050_REV_D8   0x28
 
#define MPU6000_ACCEL_DEFAULT_RANGE_G   16
 
#define MPU6000_GYRO_DEFAULT_RANGE_G   8
 
#define MPU6000_GYRO_DEFAULT_RATE   1000
 
#define MPU6000_DEFAULT_ONCHIP_FILTER_FREQ   98
 
#define MPU_MAX_READ_BUFFER_SIZE   (sizeof(MPUReport) + 1)
 
#define MPU_MAX_WRITE_BUFFER_SIZE   (2)
 
#define MPU6000_LOW_BUS_SPEED   0
 
#define MPU6000_HIGH_BUS_SPEED   0x8000
 
#define MPU6000_IS_HIGH_SPEED(r)   ((r) & MPU6000_HIGH_BUS_SPEED)
 
#define MPU6000_REG(r)   ((r) &~MPU6000_HIGH_BUS_SPEED)
 
#define MPU6000_SET_SPEED(r, s)   ((r)|(s))
 
#define MPU6000_HIGH_SPEED_OP(r)   MPU6000_SET_SPEED((r), MPU6000_HIGH_BUS_SPEED)
 
#define MPU6000_LOW_SPEED_OP(r)   MPU6000_REG((r))
 
#define MPU6000_TIMER_REDUCTION   200
 

Typedefs

typedef device::Device *(* MPU6000_constructor) (int, int, bool)
 

Enumerations

enum  MPU_DEVICE_TYPE { MPU_DEVICE_TYPE_MPU6000 = 6000, MPU_DEVICE_TYPE_ICM20602 = 20602, MPU_DEVICE_TYPE_ICM20608 = 20608, MPU_DEVICE_TYPE_ICM20689 = 20689 }
 
enum  MPU6000_BUS {
  MPU6000_BUS_ALL = 0, MPU6000_BUS_I2C_INTERNAL, MPU6000_BUS_I2C_EXTERNAL, MPU6000_BUS_SPI_INTERNAL1,
  MPU6000_BUS_SPI_INTERNAL2, MPU6000_BUS_SPI_EXTERNAL1, MPU6000_BUS_SPI_EXTERNAL2
}
 

Functions

device::DeviceMPU6000_SPI_interface (int bus, int device_type, bool external_bus)
 
device::DeviceMPU6000_I2C_interface (int bus, int device_type, bool external_bus)
 
int MPU6000_probe (device::Device *dev, int device_type)
 

Macro Definition Documentation

◆ BIT_H_RESET

#define BIT_H_RESET   0x80

Definition at line 148 of file MPU6000.hpp.

◆ BIT_I2C_IF_DIS

#define BIT_I2C_IF_DIS   0x10

Definition at line 163 of file MPU6000.hpp.

◆ BIT_INT_ANYRD_2CLEAR

#define BIT_INT_ANYRD_2CLEAR   0x10

Definition at line 161 of file MPU6000.hpp.

◆ BIT_INT_STATUS_DATA

#define BIT_INT_STATUS_DATA   0x01

Definition at line 164 of file MPU6000.hpp.

◆ BIT_RAW_RDY_EN

#define BIT_RAW_RDY_EN   0x01

Definition at line 162 of file MPU6000.hpp.

◆ BIT_SLEEP

#define BIT_SLEEP   0x40

Definition at line 147 of file MPU6000.hpp.

◆ BITS_CLKSEL

#define BITS_CLKSEL   0x07

Definition at line 149 of file MPU6000.hpp.

◆ BITS_FS_1000DPS

#define BITS_FS_1000DPS   0x10

Definition at line 158 of file MPU6000.hpp.

◆ BITS_FS_2000DPS

#define BITS_FS_2000DPS   0x18

Definition at line 159 of file MPU6000.hpp.

◆ BITS_FS_250DPS

#define BITS_FS_250DPS   0x00

Definition at line 156 of file MPU6000.hpp.

◆ BITS_FS_500DPS

#define BITS_FS_500DPS   0x08

Definition at line 157 of file MPU6000.hpp.

◆ BITS_FS_MASK

#define BITS_FS_MASK   0x18

Definition at line 160 of file MPU6000.hpp.

◆ BITS_GYRO_ST_X

#define BITS_GYRO_ST_X   0x80

Definition at line 153 of file MPU6000.hpp.

◆ BITS_GYRO_ST_Y

#define BITS_GYRO_ST_Y   0x40

Definition at line 154 of file MPU6000.hpp.

◆ BITS_GYRO_ST_Z

#define BITS_GYRO_ST_Z   0x20

Definition at line 155 of file MPU6000.hpp.

◆ DIR_READ

#define DIR_READ   0x80

Definition at line 98 of file MPU6000.hpp.

◆ DIR_WRITE

#define DIR_WRITE   0x00

Definition at line 99 of file MPU6000.hpp.

◆ ICM20602_REV_01

#define ICM20602_REV_01   1

Definition at line 192 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM20602_REV_02

#define ICM20602_REV_02   2

Definition at line 193 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM20608_REV_FF

#define ICM20608_REV_FF   0xff

Definition at line 197 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM20689_REV_03

#define ICM20689_REV_03   0x03

Definition at line 202 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM20689_REV_04

#define ICM20689_REV_04   0x04

Definition at line 203 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM20689_REV_FE

#define ICM20689_REV_FE   0xfe

Definition at line 201 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM_ACC_DLPF_CFG_1046HZ_NOLPF

#define ICM_ACC_DLPF_CFG_1046HZ_NOLPF   0x00

Definition at line 174 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_10HZ

#define ICM_ACC_DLPF_CFG_10HZ   0x05

Definition at line 179 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_218HZ

#define ICM_ACC_DLPF_CFG_218HZ   0x01

Definition at line 175 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_21HZ

#define ICM_ACC_DLPF_CFG_21HZ   0x04

Definition at line 178 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_420HZ

#define ICM_ACC_DLPF_CFG_420HZ   0x07

Definition at line 181 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_44HZ

#define ICM_ACC_DLPF_CFG_44HZ   0x03

Definition at line 177 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_5HZ

#define ICM_ACC_DLPF_CFG_5HZ   0x06

Definition at line 180 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_ACC_DLPF_CFG_99HZ

#define ICM_ACC_DLPF_CFG_99HZ   0x02

Definition at line 176 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ ICM_WHOAMI_20602

#define ICM_WHOAMI_20602   0x12

Definition at line 167 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM_WHOAMI_20608

#define ICM_WHOAMI_20608   0xaf

Definition at line 168 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICM_WHOAMI_20689

#define ICM_WHOAMI_20689   0x98

Definition at line 169 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ ICMREG_ACCEL_CONFIG2

#define ICMREG_ACCEL_CONFIG2   0x1D

Definition at line 173 of file MPU6000.hpp.

Referenced by MPU6000::_set_icm_acc_dlpf_filter().

◆ MPU6000_ACCEL_DEFAULT_RANGE_G

#define MPU6000_ACCEL_DEFAULT_RANGE_G   16

Definition at line 222 of file MPU6000.hpp.

Referenced by MPU6000::reset().

◆ MPU6000_DEFAULT_ONCHIP_FILTER_FREQ

#define MPU6000_DEFAULT_ONCHIP_FILTER_FREQ   98

Definition at line 228 of file MPU6000.hpp.

Referenced by MPU6000::reset().

◆ MPU6000_GYRO_DEFAULT_RANGE_G

#define MPU6000_GYRO_DEFAULT_RANGE_G   8

Definition at line 224 of file MPU6000.hpp.

◆ MPU6000_GYRO_DEFAULT_RATE

#define MPU6000_GYRO_DEFAULT_RATE   1000

Definition at line 225 of file MPU6000.hpp.

Referenced by MPU6000::_set_sample_rate().

◆ MPU6000_HIGH_BUS_SPEED

#define MPU6000_HIGH_BUS_SPEED   0x8000

◆ MPU6000_HIGH_SPEED_OP

#define MPU6000_HIGH_SPEED_OP (   r)    MPU6000_SET_SPEED((r), MPU6000_HIGH_BUS_SPEED)

Definition at line 262 of file MPU6000.hpp.

◆ MPU6000_IS_HIGH_SPEED

#define MPU6000_IS_HIGH_SPEED (   r)    ((r) & MPU6000_HIGH_BUS_SPEED)

Definition at line 259 of file MPU6000.hpp.

◆ MPU6000_LOW_BUS_SPEED

#define MPU6000_LOW_BUS_SPEED   0

Definition at line 257 of file MPU6000.hpp.

Referenced by MPU6000::is_mpu_device(), and MPU6000::test_error().

◆ MPU6000_LOW_SPEED_OP

#define MPU6000_LOW_SPEED_OP (   r)    MPU6000_REG((r))

Definition at line 263 of file MPU6000.hpp.

Referenced by MPU6000::read_reg16(), and MPU6000::write_reg().

◆ MPU6000_REG

#define MPU6000_REG (   r)    ((r) &~MPU6000_HIGH_BUS_SPEED)

Definition at line 260 of file MPU6000.hpp.

◆ MPU6000_REV_C4

#define MPU6000_REV_C4   0x54

Definition at line 213 of file MPU6000.hpp.

Referenced by MPU6000::probe(), and MPU6000::set_accel_range().

◆ MPU6000_REV_C5

#define MPU6000_REV_C5   0x55

Definition at line 214 of file MPU6000.hpp.

Referenced by MPU6000::probe(), and MPU6000::set_accel_range().

◆ MPU6000_REV_D10

#define MPU6000_REV_D10   0x5A

Definition at line 219 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000_REV_D6

#define MPU6000_REV_D6   0x56

Definition at line 215 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000_REV_D7

#define MPU6000_REV_D7   0x57

Definition at line 216 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000_REV_D8

#define MPU6000_REV_D8   0x58

Definition at line 217 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000_REV_D9

#define MPU6000_REV_D9   0x59

Definition at line 218 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000_SET_SPEED

#define MPU6000_SET_SPEED (   r,
 
)    ((r)|(s))

◆ MPU6000_TIMER_REDUCTION

#define MPU6000_TIMER_REDUCTION   200

Definition at line 273 of file MPU6000.hpp.

Referenced by MPU6000::start().

◆ MPU6000ES_REV_C4

#define MPU6000ES_REV_C4   0x14

Definition at line 208 of file MPU6000.hpp.

Referenced by MPU6000::probe(), and MPU6000::set_accel_range().

◆ MPU6000ES_REV_C5

#define MPU6000ES_REV_C5   0x15

Definition at line 209 of file MPU6000.hpp.

Referenced by MPU6000::probe(), and MPU6000::set_accel_range().

◆ MPU6000ES_REV_D6

#define MPU6000ES_REV_D6   0x16

Definition at line 210 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000ES_REV_D7

#define MPU6000ES_REV_D7   0x17

Definition at line 211 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6000ES_REV_D8

#define MPU6000ES_REV_D8   0x18

Definition at line 212 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU6050_REV_D8

#define MPU6050_REV_D8   0x28

Definition at line 220 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPU_CLK_SEL_PLLGYROX

#define MPU_CLK_SEL_PLLGYROX   0x01

Definition at line 150 of file MPU6000.hpp.

◆ MPU_CLK_SEL_PLLGYROZ

#define MPU_CLK_SEL_PLLGYROZ   0x03

Definition at line 151 of file MPU6000.hpp.

Referenced by MPU6000::reset().

◆ MPU_DLPF_CFG_MASK

#define MPU_DLPF_CFG_MASK   0x07

Definition at line 144 of file MPU6000.hpp.

◆ MPU_EXT_SYNC_GYROX

#define MPU_EXT_SYNC_GYROX   0x02

Definition at line 152 of file MPU6000.hpp.

◆ MPU_GYRO_DLPF_CFG_10HZ

#define MPU_GYRO_DLPF_CFG_10HZ   0x05

Definition at line 141 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_188HZ

#define MPU_GYRO_DLPF_CFG_188HZ   0x01

Definition at line 137 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_20HZ

#define MPU_GYRO_DLPF_CFG_20HZ   0x04

Definition at line 140 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_2100HZ_NOLPF

#define MPU_GYRO_DLPF_CFG_2100HZ_NOLPF   0x07

Definition at line 143 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_256HZ_NOLPF2

#define MPU_GYRO_DLPF_CFG_256HZ_NOLPF2   0x00

Definition at line 136 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_42HZ

#define MPU_GYRO_DLPF_CFG_42HZ   0x03

Definition at line 139 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_5HZ

#define MPU_GYRO_DLPF_CFG_5HZ   0x06

Definition at line 142 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_GYRO_DLPF_CFG_98HZ

#define MPU_GYRO_DLPF_CFG_98HZ   0x02

Definition at line 138 of file MPU6000.hpp.

Referenced by MPU6000::_set_dlpf_filter().

◆ MPU_MAX_READ_BUFFER_SIZE

#define MPU_MAX_READ_BUFFER_SIZE   (sizeof(MPUReport) + 1)

Definition at line 248 of file MPU6000.hpp.

◆ MPU_MAX_WRITE_BUFFER_SIZE

#define MPU_MAX_WRITE_BUFFER_SIZE   (2)

Definition at line 249 of file MPU6000.hpp.

◆ MPU_WHOAMI_6000

#define MPU_WHOAMI_6000   0x68

Definition at line 166 of file MPU6000.hpp.

Referenced by MPU6000::probe().

◆ MPUREG_ACCEL_CONFIG

#define MPUREG_ACCEL_CONFIG   0x1C

Definition at line 106 of file MPU6000.hpp.

◆ MPUREG_ACCEL_XOUT_H

#define MPUREG_ACCEL_XOUT_H   0x3B

Definition at line 111 of file MPU6000.hpp.

◆ MPUREG_ACCEL_XOUT_L

#define MPUREG_ACCEL_XOUT_L   0x3C

Definition at line 112 of file MPU6000.hpp.

◆ MPUREG_ACCEL_YOUT_H

#define MPUREG_ACCEL_YOUT_H   0x3D

Definition at line 113 of file MPU6000.hpp.

◆ MPUREG_ACCEL_YOUT_L

#define MPUREG_ACCEL_YOUT_L   0x3E

Definition at line 114 of file MPU6000.hpp.

◆ MPUREG_ACCEL_ZOUT_H

#define MPUREG_ACCEL_ZOUT_H   0x3F

Definition at line 115 of file MPU6000.hpp.

◆ MPUREG_ACCEL_ZOUT_L

#define MPUREG_ACCEL_ZOUT_L   0x40

Definition at line 116 of file MPU6000.hpp.

◆ MPUREG_CONFIG

#define MPUREG_CONFIG   0x1A

Definition at line 104 of file MPU6000.hpp.

◆ MPUREG_FIFO_COUNTH

#define MPUREG_FIFO_COUNTH   0x72

Definition at line 128 of file MPU6000.hpp.

◆ MPUREG_FIFO_COUNTL

#define MPUREG_FIFO_COUNTL   0x73

Definition at line 129 of file MPU6000.hpp.

◆ MPUREG_FIFO_EN

#define MPUREG_FIFO_EN   0x23

Definition at line 107 of file MPU6000.hpp.

◆ MPUREG_FIFO_R_W

#define MPUREG_FIFO_R_W   0x74

Definition at line 130 of file MPU6000.hpp.

◆ MPUREG_GYRO_CONFIG

#define MPUREG_GYRO_CONFIG   0x1B

Definition at line 105 of file MPU6000.hpp.

◆ MPUREG_GYRO_XOUT_H

#define MPUREG_GYRO_XOUT_H   0x43

Definition at line 119 of file MPU6000.hpp.

◆ MPUREG_GYRO_XOUT_L

#define MPUREG_GYRO_XOUT_L   0x44

Definition at line 120 of file MPU6000.hpp.

◆ MPUREG_GYRO_YOUT_H

#define MPUREG_GYRO_YOUT_H   0x45

Definition at line 121 of file MPU6000.hpp.

◆ MPUREG_GYRO_YOUT_L

#define MPUREG_GYRO_YOUT_L   0x46

Definition at line 122 of file MPU6000.hpp.

◆ MPUREG_GYRO_ZOUT_H

#define MPUREG_GYRO_ZOUT_H   0x47

Definition at line 123 of file MPU6000.hpp.

◆ MPUREG_GYRO_ZOUT_L

#define MPUREG_GYRO_ZOUT_L   0x48

Definition at line 124 of file MPU6000.hpp.

◆ MPUREG_ICM_UNDOC1

#define MPUREG_ICM_UNDOC1   0x11

Definition at line 186 of file MPU6000.hpp.

Referenced by MPU6000::check_registers(), and MPU6000::reset().

◆ MPUREG_ICM_UNDOC1_VALUE

#define MPUREG_ICM_UNDOC1_VALUE   0xc9

Definition at line 187 of file MPU6000.hpp.

Referenced by MPU6000::reset().

◆ MPUREG_INT_ENABLE

#define MPUREG_INT_ENABLE   0x38

Definition at line 109 of file MPU6000.hpp.

◆ MPUREG_INT_PIN_CFG

#define MPUREG_INT_PIN_CFG   0x37

Definition at line 108 of file MPU6000.hpp.

◆ MPUREG_INT_STATUS

#define MPUREG_INT_STATUS   0x3A

Definition at line 110 of file MPU6000.hpp.

◆ MPUREG_PRODUCT_ID

#define MPUREG_PRODUCT_ID   0x0C

Definition at line 131 of file MPU6000.hpp.

Referenced by MPU6000::print_registers(), and MPU6000::probe().

◆ MPUREG_PWR_MGMT_1

#define MPUREG_PWR_MGMT_1   0x6B

Definition at line 126 of file MPU6000.hpp.

◆ MPUREG_PWR_MGMT_2

#define MPUREG_PWR_MGMT_2   0x6C

Definition at line 127 of file MPU6000.hpp.

◆ MPUREG_SMPLRT_DIV

#define MPUREG_SMPLRT_DIV   0x19

Definition at line 103 of file MPU6000.hpp.

◆ MPUREG_TEMP_OUT_H

#define MPUREG_TEMP_OUT_H   0x41

Definition at line 117 of file MPU6000.hpp.

◆ MPUREG_TEMP_OUT_L

#define MPUREG_TEMP_OUT_L   0x42

Definition at line 118 of file MPU6000.hpp.

◆ MPUREG_TRIM1

#define MPUREG_TRIM1   0x0D

Definition at line 132 of file MPU6000.hpp.

Referenced by MPU6000::factory_self_test().

◆ MPUREG_TRIM2

#define MPUREG_TRIM2   0x0E

Definition at line 133 of file MPU6000.hpp.

Referenced by MPU6000::factory_self_test().

◆ MPUREG_TRIM3

#define MPUREG_TRIM3   0x0F

Definition at line 134 of file MPU6000.hpp.

Referenced by MPU6000::factory_self_test().

◆ MPUREG_TRIM4

#define MPUREG_TRIM4   0x10

Definition at line 135 of file MPU6000.hpp.

Referenced by MPU6000::factory_self_test().

◆ MPUREG_USER_CTRL

#define MPUREG_USER_CTRL   0x6A

Definition at line 125 of file MPU6000.hpp.

◆ MPUREG_WHOAMI

#define MPUREG_WHOAMI   0x75

Definition at line 102 of file MPU6000.hpp.

Typedef Documentation

◆ MPU6000_constructor

typedef device::Device*(* MPU6000_constructor) (int, int, bool)

Definition at line 270 of file MPU6000.hpp.

Enumeration Type Documentation

◆ MPU6000_BUS

Enumerator
MPU6000_BUS_ALL 
MPU6000_BUS_I2C_INTERNAL 
MPU6000_BUS_I2C_EXTERNAL 
MPU6000_BUS_SPI_INTERNAL1 
MPU6000_BUS_SPI_INTERNAL2 
MPU6000_BUS_SPI_EXTERNAL1 
MPU6000_BUS_SPI_EXTERNAL2 

Definition at line 275 of file MPU6000.hpp.

◆ MPU_DEVICE_TYPE

Enumerator
MPU_DEVICE_TYPE_MPU6000 
MPU_DEVICE_TYPE_ICM20602 
MPU_DEVICE_TYPE_ICM20608 
MPU_DEVICE_TYPE_ICM20689 

Definition at line 91 of file MPU6000.hpp.

Function Documentation

◆ MPU6000_I2C_interface()

device::Device* MPU6000_I2C_interface ( int  bus,
int  device_type,
bool  external_bus 
)

◆ MPU6000_probe()

int MPU6000_probe ( device::Device dev,
int  device_type 
)

◆ MPU6000_SPI_interface()

device::Device* MPU6000_SPI_interface ( int  bus,
int  device_type,
bool  external_bus 
)