PX4 Firmware
PX4 Autopilot Software http://px4.io
mpu9250.h File Reference
#include <lib/drivers/accelerometer/PX4Accelerometer.hpp>
#include <lib/drivers/gyroscope/PX4Gyroscope.hpp>
#include <lib/ecl/geo/geo.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <lib/systemlib/conversions.h>
#include <lib/systemlib/px4_macros.h>
#include "MPU9250_mag.h"
Include dependency graph for mpu9250.h:
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  MPU9250
 

Macros

#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_ACCEL_CONFIG2   0x1D
 
#define MPUREG_LPACCEL_ODR   0x1E
 
#define MPUREG_WOM_THRESH   0x1F
 
#define MPUREG_FIFO_EN   0x23
 
#define MPUREG_I2C_MST_CTRL   0x24
 
#define MPUREG_I2C_SLV0_ADDR   0x25
 
#define MPUREG_I2C_SLV0_REG   0x26
 
#define MPUREG_I2C_SLV0_CTRL   0x27
 
#define MPUREG_I2C_SLV1_ADDR   0x28
 
#define MPUREG_I2C_SLV1_REG   0x29
 
#define MPUREG_I2C_SLV1_CTRL   0x2A
 
#define MPUREG_I2C_SLV2_ADDR   0x2B
 
#define MPUREG_I2C_SLV2_REG   0x2C
 
#define MPUREG_I2C_SLV2_CTRL   0x2D
 
#define MPUREG_I2C_SLV3_ADDR   0x2E
 
#define MPUREG_I2C_SLV3_REG   0x2F
 
#define MPUREG_I2C_SLV3_CTRL   0x30
 
#define MPUREG_I2C_SLV4_ADDR   0x31
 
#define MPUREG_I2C_SLV4_REG   0x32
 
#define MPUREG_I2C_SLV4_DO   0x33
 
#define MPUREG_I2C_SLV4_CTRL   0x34
 
#define MPUREG_I2C_SLV4_DI   0x35
 
#define MPUREG_I2C_MST_STATUS   0x36
 
#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_EXT_SENS_DATA_00   0x49
 
#define MPUREG_I2C_SLV0_D0   0x63
 
#define MPUREG_I2C_SLV1_D0   0x64
 
#define MPUREG_I2C_SLV2_D0   0x65
 
#define MPUREG_I2C_SLV3_D0   0x66
 
#define MPUREG_I2C_MST_DELAY_CTRL   0x67
 
#define MPUREG_SIGNAL_PATH_RESET   0x68
 
#define MPUREG_MOT_DETECT_CTRL   0x69
 
#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 BIT_SLEEP   0x40
 
#define BIT_H_RESET   0x80
 
#define MPU_CLK_SEL_AUTO   0x01
 
#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 BITS_DLPF_CFG_250HZ   0x00
 
#define BITS_DLPF_CFG_184HZ   0x01
 
#define BITS_DLPF_CFG_92HZ   0x02
 
#define BITS_DLPF_CFG_41HZ   0x03
 
#define BITS_DLPF_CFG_20HZ   0x04
 
#define BITS_DLPF_CFG_10HZ   0x05
 
#define BITS_DLPF_CFG_5HZ   0x06
 
#define BITS_DLPF_CFG_3600HZ   0x07
 
#define BITS_DLPF_CFG_MASK   0x07
 
#define BITS_ACCEL_CONFIG2_41HZ   0x03
 
#define BIT_RAW_RDY_EN   0x01
 
#define BIT_INT_ANYRD_2CLEAR   0x10
 
#define BIT_INT_BYPASS_EN   0x02
 
#define BIT_I2C_READ_FLAG   0x80
 
#define BIT_I2C_SLV0_NACK   0x01
 
#define BIT_I2C_FIFO_EN   0x40
 
#define BIT_I2C_MST_EN   0x20
 
#define BIT_I2C_IF_DIS   0x10
 
#define BIT_FIFO_RST   0x04
 
#define BIT_I2C_MST_RST   0x02
 
#define BIT_SIG_COND_RST   0x01
 
#define BIT_I2C_SLV0_EN   0x80
 
#define BIT_I2C_SLV0_BYTE_SW   0x40
 
#define BIT_I2C_SLV0_REG_DIS   0x20
 
#define BIT_I2C_SLV0_REG_GRP   0x10
 
#define BIT_I2C_MST_MULT_MST_EN   0x80
 
#define BIT_I2C_MST_WAIT_FOR_ES   0x40
 
#define BIT_I2C_MST_SLV_3_FIFO_EN   0x20
 
#define BIT_I2C_MST_P_NSR   0x10
 
#define BITS_I2C_MST_CLOCK_258HZ   0x08
 
#define BITS_I2C_MST_CLOCK_400HZ   0x0D
 
#define BIT_I2C_SLV0_DLY_EN   0x01
 
#define BIT_I2C_SLV1_DLY_EN   0x02
 
#define BIT_I2C_SLV2_DLY_EN   0x04
 
#define BIT_I2C_SLV3_DLY_EN   0x08
 
#define MPU_WHOAMI_9250   0x71
 
#define MPU_WHOAMI_6500   0x70
 
#define MPU9250_ACCEL_DEFAULT_RATE   1000
 
#define MPU9250_ACCEL_MAX_OUTPUT_RATE   280
 
#define MPU9250_ACCEL_DEFAULT_DRIVER_FILTER_FREQ   30
 
#define MPU9250_GYRO_DEFAULT_RATE   1000
 
#define MPU9250_GYRO_MAX_OUTPUT_RATE   MPU9250_ACCEL_MAX_OUTPUT_RATE
 
#define MPU9250_GYRO_DEFAULT_DRIVER_FILTER_FREQ   30
 
#define MPU9250_DEFAULT_ONCHIP_FILTER_FREQ   92
 
#define MPU9250_LOW_BUS_SPEED   0
 
#define MPU9250_HIGH_BUS_SPEED   0x8000
 
#define MPU9250_REG_MASK   0x00FF
 
#define MPU9250_IS_HIGH_SPEED(r)   ((r) & MPU9250_HIGH_BUS_SPEED)
 
#define MPU9250_REG(r)   ((r) & MPU9250_REG_MASK)
 
#define MPU9250_SET_SPEED(r, s)   ((r)|(s))
 
#define MPU9250_HIGH_SPEED_OP(r)   MPU9250_SET_SPEED((r), MPU9250_HIGH_BUS_SPEED)
 
#define MPU9250_LOW_SPEED_OP(r)   ((r) &~MPU9250_HIGH_BUS_SPEED)
 

Typedefs

typedef device::Device *(* MPU9250_constructor) (int, uint32_t)
 

Functions

device::DeviceMPU9250_SPI_interface (int bus, uint32_t cs)
 
device::DeviceMPU9250_I2C_interface (int bus, uint32_t address)
 
int MPU9250_probe (device::Device *dev)
 

Macro Definition Documentation

◆ BIT_FIFO_RST

#define BIT_FIFO_RST   0x04

Definition at line 148 of file mpu9250.h.

◆ BIT_H_RESET

#define BIT_H_RESET   0x80

Definition at line 114 of file mpu9250.h.

◆ BIT_I2C_FIFO_EN

#define BIT_I2C_FIFO_EN   0x40

Definition at line 145 of file mpu9250.h.

◆ BIT_I2C_IF_DIS

#define BIT_I2C_IF_DIS   0x10

Definition at line 147 of file mpu9250.h.

◆ BIT_I2C_MST_EN

#define BIT_I2C_MST_EN   0x20

Definition at line 146 of file mpu9250.h.

◆ BIT_I2C_MST_MULT_MST_EN

#define BIT_I2C_MST_MULT_MST_EN   0x80

Definition at line 157 of file mpu9250.h.

◆ BIT_I2C_MST_P_NSR

#define BIT_I2C_MST_P_NSR   0x10

Definition at line 160 of file mpu9250.h.

◆ BIT_I2C_MST_RST

#define BIT_I2C_MST_RST   0x02

Definition at line 149 of file mpu9250.h.

◆ BIT_I2C_MST_SLV_3_FIFO_EN

#define BIT_I2C_MST_SLV_3_FIFO_EN   0x20

Definition at line 159 of file mpu9250.h.

◆ BIT_I2C_MST_WAIT_FOR_ES

#define BIT_I2C_MST_WAIT_FOR_ES   0x40

Definition at line 158 of file mpu9250.h.

◆ BIT_I2C_READ_FLAG

#define BIT_I2C_READ_FLAG   0x80

Definition at line 142 of file mpu9250.h.

◆ BIT_I2C_SLV0_BYTE_SW

#define BIT_I2C_SLV0_BYTE_SW   0x40

Definition at line 153 of file mpu9250.h.

◆ BIT_I2C_SLV0_DLY_EN

#define BIT_I2C_SLV0_DLY_EN   0x01

Definition at line 164 of file mpu9250.h.

◆ BIT_I2C_SLV0_EN

#define BIT_I2C_SLV0_EN   0x80

Definition at line 152 of file mpu9250.h.

◆ BIT_I2C_SLV0_NACK

#define BIT_I2C_SLV0_NACK   0x01

Definition at line 144 of file mpu9250.h.

◆ BIT_I2C_SLV0_REG_DIS

#define BIT_I2C_SLV0_REG_DIS   0x20

Definition at line 154 of file mpu9250.h.

◆ BIT_I2C_SLV0_REG_GRP

#define BIT_I2C_SLV0_REG_GRP   0x10

Definition at line 155 of file mpu9250.h.

◆ BIT_I2C_SLV1_DLY_EN

#define BIT_I2C_SLV1_DLY_EN   0x02

Definition at line 165 of file mpu9250.h.

◆ BIT_I2C_SLV2_DLY_EN

#define BIT_I2C_SLV2_DLY_EN   0x04

Definition at line 166 of file mpu9250.h.

◆ BIT_I2C_SLV3_DLY_EN

#define BIT_I2C_SLV3_DLY_EN   0x08

Definition at line 167 of file mpu9250.h.

◆ BIT_INT_ANYRD_2CLEAR

#define BIT_INT_ANYRD_2CLEAR   0x10

Definition at line 139 of file mpu9250.h.

◆ BIT_INT_BYPASS_EN

#define BIT_INT_BYPASS_EN   0x02

Definition at line 140 of file mpu9250.h.

◆ BIT_RAW_RDY_EN

#define BIT_RAW_RDY_EN   0x01

Definition at line 138 of file mpu9250.h.

◆ BIT_SIG_COND_RST

#define BIT_SIG_COND_RST   0x01

Definition at line 150 of file mpu9250.h.

◆ BIT_SLEEP

#define BIT_SLEEP   0x40

Definition at line 113 of file mpu9250.h.

◆ BITS_ACCEL_CONFIG2_41HZ

#define BITS_ACCEL_CONFIG2_41HZ   0x03

Definition at line 136 of file mpu9250.h.

◆ BITS_DLPF_CFG_10HZ

#define BITS_DLPF_CFG_10HZ   0x05

Definition at line 131 of file mpu9250.h.

◆ BITS_DLPF_CFG_184HZ

#define BITS_DLPF_CFG_184HZ   0x01

Definition at line 127 of file mpu9250.h.

◆ BITS_DLPF_CFG_20HZ

#define BITS_DLPF_CFG_20HZ   0x04

Definition at line 130 of file mpu9250.h.

◆ BITS_DLPF_CFG_250HZ

#define BITS_DLPF_CFG_250HZ   0x00

Definition at line 126 of file mpu9250.h.

◆ BITS_DLPF_CFG_3600HZ

#define BITS_DLPF_CFG_3600HZ   0x07

Definition at line 133 of file mpu9250.h.

◆ BITS_DLPF_CFG_41HZ

#define BITS_DLPF_CFG_41HZ   0x03

Definition at line 129 of file mpu9250.h.

◆ BITS_DLPF_CFG_5HZ

#define BITS_DLPF_CFG_5HZ   0x06

Definition at line 132 of file mpu9250.h.

◆ BITS_DLPF_CFG_92HZ

#define BITS_DLPF_CFG_92HZ   0x02

Definition at line 128 of file mpu9250.h.

◆ BITS_DLPF_CFG_MASK

#define BITS_DLPF_CFG_MASK   0x07

Definition at line 134 of file mpu9250.h.

◆ BITS_FS_1000DPS

#define BITS_FS_1000DPS   0x10

Definition at line 122 of file mpu9250.h.

◆ BITS_FS_2000DPS

#define BITS_FS_2000DPS   0x18

Definition at line 123 of file mpu9250.h.

◆ BITS_FS_250DPS

#define BITS_FS_250DPS   0x00

Definition at line 120 of file mpu9250.h.

◆ BITS_FS_500DPS

#define BITS_FS_500DPS   0x08

Definition at line 121 of file mpu9250.h.

◆ BITS_FS_MASK

#define BITS_FS_MASK   0x18

Definition at line 124 of file mpu9250.h.

◆ BITS_GYRO_ST_X

#define BITS_GYRO_ST_X   0x80

Definition at line 117 of file mpu9250.h.

◆ BITS_GYRO_ST_Y

#define BITS_GYRO_ST_Y   0x40

Definition at line 118 of file mpu9250.h.

◆ BITS_GYRO_ST_Z

#define BITS_GYRO_ST_Z   0x20

Definition at line 119 of file mpu9250.h.

◆ BITS_I2C_MST_CLOCK_258HZ

#define BITS_I2C_MST_CLOCK_258HZ   0x08

Definition at line 161 of file mpu9250.h.

◆ BITS_I2C_MST_CLOCK_400HZ

#define BITS_I2C_MST_CLOCK_400HZ   0x0D

Definition at line 162 of file mpu9250.h.

◆ MPU9250_ACCEL_DEFAULT_DRIVER_FILTER_FREQ

#define MPU9250_ACCEL_DEFAULT_DRIVER_FILTER_FREQ   30

Definition at line 174 of file mpu9250.h.

◆ MPU9250_ACCEL_DEFAULT_RATE

#define MPU9250_ACCEL_DEFAULT_RATE   1000

Definition at line 172 of file mpu9250.h.

◆ MPU9250_ACCEL_MAX_OUTPUT_RATE

#define MPU9250_ACCEL_MAX_OUTPUT_RATE   280

Definition at line 173 of file mpu9250.h.

◆ MPU9250_DEFAULT_ONCHIP_FILTER_FREQ

#define MPU9250_DEFAULT_ONCHIP_FILTER_FREQ   92

Definition at line 180 of file mpu9250.h.

Referenced by MPU9250::reset_mpu().

◆ MPU9250_GYRO_DEFAULT_DRIVER_FILTER_FREQ

#define MPU9250_GYRO_DEFAULT_DRIVER_FILTER_FREQ   30

Definition at line 178 of file mpu9250.h.

◆ MPU9250_GYRO_DEFAULT_RATE

#define MPU9250_GYRO_DEFAULT_RATE   1000

Definition at line 175 of file mpu9250.h.

◆ MPU9250_GYRO_MAX_OUTPUT_RATE

#define MPU9250_GYRO_MAX_OUTPUT_RATE   MPU9250_ACCEL_MAX_OUTPUT_RATE

Definition at line 177 of file mpu9250.h.

◆ MPU9250_HIGH_BUS_SPEED

#define MPU9250_HIGH_BUS_SPEED   0x8000

Definition at line 209 of file mpu9250.h.

Referenced by MPU9250::check_registers(), and MPU9250::measure().

◆ MPU9250_HIGH_SPEED_OP

#define MPU9250_HIGH_SPEED_OP (   r)    MPU9250_SET_SPEED((r), MPU9250_HIGH_BUS_SPEED)

Definition at line 214 of file mpu9250.h.

◆ MPU9250_IS_HIGH_SPEED

#define MPU9250_IS_HIGH_SPEED (   r)    ((r) & MPU9250_HIGH_BUS_SPEED)

Definition at line 211 of file mpu9250.h.

Referenced by MPU9250_SPI::set_bus_frequency().

◆ MPU9250_LOW_BUS_SPEED

#define MPU9250_LOW_BUS_SPEED   0

Definition at line 208 of file mpu9250.h.

◆ MPU9250_LOW_SPEED_OP

#define MPU9250_LOW_SPEED_OP (   r)    ((r) &~MPU9250_HIGH_BUS_SPEED)

Definition at line 215 of file mpu9250.h.

Referenced by MPU9250::read_reg16(), MPU9250_mag::write_reg(), and MPU9250::write_reg().

◆ MPU9250_REG

#define MPU9250_REG (   r)    ((r) & MPU9250_REG_MASK)

Definition at line 212 of file mpu9250.h.

Referenced by MPU9250_SPI::set_bus_frequency().

◆ MPU9250_REG_MASK

#define MPU9250_REG_MASK   0x00FF

Definition at line 210 of file mpu9250.h.

◆ MPU9250_SET_SPEED

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

Definition at line 213 of file mpu9250.h.

Referenced by MPU9250::read_reg(), and MPU9250::read_reg_range().

◆ MPU_CLK_SEL_AUTO

#define MPU_CLK_SEL_AUTO   0x01

Definition at line 115 of file mpu9250.h.

◆ MPU_WHOAMI_6500

◆ MPU_WHOAMI_9250

◆ MPUREG_ACCEL_CONFIG

#define MPUREG_ACCEL_CONFIG   0x1C

Definition at line 56 of file mpu9250.h.

◆ MPUREG_ACCEL_CONFIG2

#define MPUREG_ACCEL_CONFIG2   0x1D

Definition at line 57 of file mpu9250.h.

◆ MPUREG_ACCEL_XOUT_H

#define MPUREG_ACCEL_XOUT_H   0x3B

Definition at line 83 of file mpu9250.h.

◆ MPUREG_ACCEL_XOUT_L

#define MPUREG_ACCEL_XOUT_L   0x3C

Definition at line 84 of file mpu9250.h.

◆ MPUREG_ACCEL_YOUT_H

#define MPUREG_ACCEL_YOUT_H   0x3D

Definition at line 85 of file mpu9250.h.

◆ MPUREG_ACCEL_YOUT_L

#define MPUREG_ACCEL_YOUT_L   0x3E

Definition at line 86 of file mpu9250.h.

◆ MPUREG_ACCEL_ZOUT_H

#define MPUREG_ACCEL_ZOUT_H   0x3F

Definition at line 87 of file mpu9250.h.

◆ MPUREG_ACCEL_ZOUT_L

#define MPUREG_ACCEL_ZOUT_L   0x40

Definition at line 88 of file mpu9250.h.

◆ MPUREG_CONFIG

#define MPUREG_CONFIG   0x1A

Definition at line 54 of file mpu9250.h.

◆ MPUREG_EXT_SENS_DATA_00

#define MPUREG_EXT_SENS_DATA_00   0x49

Definition at line 97 of file mpu9250.h.

◆ MPUREG_FIFO_COUNTH

#define MPUREG_FIFO_COUNTH   0x72

Definition at line 108 of file mpu9250.h.

◆ MPUREG_FIFO_COUNTL

#define MPUREG_FIFO_COUNTL   0x73

Definition at line 109 of file mpu9250.h.

◆ MPUREG_FIFO_EN

#define MPUREG_FIFO_EN   0x23

Definition at line 60 of file mpu9250.h.

◆ MPUREG_FIFO_R_W

#define MPUREG_FIFO_R_W   0x74

Definition at line 110 of file mpu9250.h.

◆ MPUREG_GYRO_CONFIG

#define MPUREG_GYRO_CONFIG   0x1B

Definition at line 55 of file mpu9250.h.

◆ MPUREG_GYRO_XOUT_H

#define MPUREG_GYRO_XOUT_H   0x43

Definition at line 91 of file mpu9250.h.

◆ MPUREG_GYRO_XOUT_L

#define MPUREG_GYRO_XOUT_L   0x44

Definition at line 92 of file mpu9250.h.

◆ MPUREG_GYRO_YOUT_H

#define MPUREG_GYRO_YOUT_H   0x45

Definition at line 93 of file mpu9250.h.

◆ MPUREG_GYRO_YOUT_L

#define MPUREG_GYRO_YOUT_L   0x46

Definition at line 94 of file mpu9250.h.

◆ MPUREG_GYRO_ZOUT_H

#define MPUREG_GYRO_ZOUT_H   0x47

Definition at line 95 of file mpu9250.h.

◆ MPUREG_GYRO_ZOUT_L

#define MPUREG_GYRO_ZOUT_L   0x48

Definition at line 96 of file mpu9250.h.

◆ MPUREG_I2C_MST_CTRL

#define MPUREG_I2C_MST_CTRL   0x24

Definition at line 61 of file mpu9250.h.

◆ MPUREG_I2C_MST_DELAY_CTRL

#define MPUREG_I2C_MST_DELAY_CTRL   0x67

Definition at line 102 of file mpu9250.h.

◆ MPUREG_I2C_MST_STATUS

#define MPUREG_I2C_MST_STATUS   0x36

Definition at line 79 of file mpu9250.h.

◆ MPUREG_I2C_SLV0_ADDR

#define MPUREG_I2C_SLV0_ADDR   0x25

Definition at line 62 of file mpu9250.h.

◆ MPUREG_I2C_SLV0_CTRL

#define MPUREG_I2C_SLV0_CTRL   0x27

Definition at line 64 of file mpu9250.h.

◆ MPUREG_I2C_SLV0_D0

#define MPUREG_I2C_SLV0_D0   0x63

Definition at line 98 of file mpu9250.h.

◆ MPUREG_I2C_SLV0_REG

#define MPUREG_I2C_SLV0_REG   0x26

Definition at line 63 of file mpu9250.h.

◆ MPUREG_I2C_SLV1_ADDR

#define MPUREG_I2C_SLV1_ADDR   0x28

Definition at line 65 of file mpu9250.h.

◆ MPUREG_I2C_SLV1_CTRL

#define MPUREG_I2C_SLV1_CTRL   0x2A

Definition at line 67 of file mpu9250.h.

◆ MPUREG_I2C_SLV1_D0

#define MPUREG_I2C_SLV1_D0   0x64

Definition at line 99 of file mpu9250.h.

◆ MPUREG_I2C_SLV1_REG

#define MPUREG_I2C_SLV1_REG   0x29

Definition at line 66 of file mpu9250.h.

◆ MPUREG_I2C_SLV2_ADDR

#define MPUREG_I2C_SLV2_ADDR   0x2B

Definition at line 68 of file mpu9250.h.

◆ MPUREG_I2C_SLV2_CTRL

#define MPUREG_I2C_SLV2_CTRL   0x2D

Definition at line 70 of file mpu9250.h.

◆ MPUREG_I2C_SLV2_D0

#define MPUREG_I2C_SLV2_D0   0x65

Definition at line 100 of file mpu9250.h.

◆ MPUREG_I2C_SLV2_REG

#define MPUREG_I2C_SLV2_REG   0x2C

Definition at line 69 of file mpu9250.h.

◆ MPUREG_I2C_SLV3_ADDR

#define MPUREG_I2C_SLV3_ADDR   0x2E

Definition at line 71 of file mpu9250.h.

◆ MPUREG_I2C_SLV3_CTRL

#define MPUREG_I2C_SLV3_CTRL   0x30

Definition at line 73 of file mpu9250.h.

◆ MPUREG_I2C_SLV3_D0

#define MPUREG_I2C_SLV3_D0   0x66

Definition at line 101 of file mpu9250.h.

◆ MPUREG_I2C_SLV3_REG

#define MPUREG_I2C_SLV3_REG   0x2F

Definition at line 72 of file mpu9250.h.

◆ MPUREG_I2C_SLV4_ADDR

#define MPUREG_I2C_SLV4_ADDR   0x31

Definition at line 74 of file mpu9250.h.

◆ MPUREG_I2C_SLV4_CTRL

#define MPUREG_I2C_SLV4_CTRL   0x34

Definition at line 77 of file mpu9250.h.

◆ MPUREG_I2C_SLV4_DI

#define MPUREG_I2C_SLV4_DI   0x35

Definition at line 78 of file mpu9250.h.

◆ MPUREG_I2C_SLV4_DO

#define MPUREG_I2C_SLV4_DO   0x33

Definition at line 76 of file mpu9250.h.

◆ MPUREG_I2C_SLV4_REG

#define MPUREG_I2C_SLV4_REG   0x32

Definition at line 75 of file mpu9250.h.

◆ MPUREG_INT_ENABLE

#define MPUREG_INT_ENABLE   0x38

Definition at line 81 of file mpu9250.h.

◆ MPUREG_INT_PIN_CFG

#define MPUREG_INT_PIN_CFG   0x37

Definition at line 80 of file mpu9250.h.

◆ MPUREG_INT_STATUS

#define MPUREG_INT_STATUS   0x3A

Definition at line 82 of file mpu9250.h.

◆ MPUREG_LPACCEL_ODR

#define MPUREG_LPACCEL_ODR   0x1E

Definition at line 58 of file mpu9250.h.

◆ MPUREG_MOT_DETECT_CTRL

#define MPUREG_MOT_DETECT_CTRL   0x69

Definition at line 104 of file mpu9250.h.

◆ MPUREG_PWR_MGMT_1

#define MPUREG_PWR_MGMT_1   0x6B

Definition at line 106 of file mpu9250.h.

◆ MPUREG_PWR_MGMT_2

#define MPUREG_PWR_MGMT_2   0x6C

Definition at line 107 of file mpu9250.h.

◆ MPUREG_SIGNAL_PATH_RESET

#define MPUREG_SIGNAL_PATH_RESET   0x68

Definition at line 103 of file mpu9250.h.

◆ MPUREG_SMPLRT_DIV

#define MPUREG_SMPLRT_DIV   0x19

Definition at line 53 of file mpu9250.h.

◆ MPUREG_TEMP_OUT_H

#define MPUREG_TEMP_OUT_H   0x41

Definition at line 89 of file mpu9250.h.

◆ MPUREG_TEMP_OUT_L

#define MPUREG_TEMP_OUT_L   0x42

Definition at line 90 of file mpu9250.h.

◆ MPUREG_USER_CTRL

#define MPUREG_USER_CTRL   0x6A

Definition at line 105 of file mpu9250.h.

◆ MPUREG_WHOAMI

#define MPUREG_WHOAMI   0x75

Definition at line 52 of file mpu9250.h.

◆ MPUREG_WOM_THRESH

#define MPUREG_WOM_THRESH   0x1F

Definition at line 59 of file mpu9250.h.

Typedef Documentation

◆ MPU9250_constructor

typedef device::Device*(* MPU9250_constructor) (int, uint32_t)

Definition at line 222 of file mpu9250.h.

Function Documentation

◆ MPU9250_I2C_interface()

device::Device* MPU9250_I2C_interface ( int  bus,
uint32_t  address 
)

◆ MPU9250_probe()

int MPU9250_probe ( device::Device dev)

◆ MPU9250_SPI_interface()

device::Device * MPU9250_SPI_interface ( int  bus,
uint32_t  cs 
)

Definition at line 83 of file mpu9250_spi.cpp.