38#define MPU60X0_DEFAULT_SMPLRT_DIV 0
40#define MPU60X0_DEFAULT_FS_SEL MPU60X0_GYRO_RANGE_2000
42#define MPU60X0_DEFAULT_AFS_SEL MPU60X0_ACCEL_RANGE_16G
44#define MPU60X0_DEFAULT_DLPF_CFG MPU60X0_DLPF_98HZ
46#define MPU60X0_DEFAULT_DLPF_CFG_ACC MPU60X0_DLPF_ACC_99HZ
48#define MPU60X0_DEFAULT_INT_CFG 1
50#define MPU60X0_DEFAULT_CLK_SEL 1
53#ifndef MPU60X0_I2C_NB_SLAVES
54#define MPU60X0_I2C_NB_SLAVES 5
62#define MPU60X0_GYRO_SENS_250 0.544883
63#define MPU60X0_GYRO_SENS_500 1.08977
64#define MPU60X0_GYRO_SENS_1000 2.17953
65#define MPU60X0_GYRO_SENS_2000 4.35906
76#define MPU60X0_ACCEL_SENS_2G 0.613125
77#define MPU60X0_ACCEL_SENS_4G 1.22625
78#define MPU60X0_ACCEL_SENS_8G 2.4525
79#define MPU60X0_ACCEL_SENS_16G 4.905
Mpu60x0I2cSlaveConfigure configure
uint8_t i2c_mst_delay
MPU I2C slaves delayed sample rate.
void mpu60x0_set_default_config(struct Mpu60x0Config *c)
#define MPU60X0_I2C_NB_SLAVES
enum Mpu60x0MstClk i2c_mst_clk
MPU I2C master clock speed.
bool initialized
config done flag
const struct FloatVect3 MPU60X0_ACCEL_SENS_F[4]
uint8_t nb_bytes
number of bytes to read starting with MPU60X0_REG_INT_STATUS
bool(* Mpu60x0I2cSlaveConfigure)(Mpu60x0ConfigSet mpu_set, void *mpu)
function prototype for configuration of a single I2C slave
Mpu60x0Type
MPU60x0 sensor type.
void mpu60x0_send_config(Mpu60x0ConfigSet mpu_set, void *mpu, struct Mpu60x0Config *config)
Configuration sequence called once before normal use.
uint8_t smplrt_div
Sample rate divider.
const float MPU60X0_ACCEL_SENS[4]
uint8_t nb_slaves
number of used I2C slaves
uint8_t nb_slave_init
number of already configured/initialized slaves
struct Mpu60x0I2cSlave slaves[MPU60X0_I2C_NB_SLAVES]
I2C slaves.
const float MPU60X0_GYRO_SENS[4]
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
enum Mpu60x0Type type
The type of sensor (MPU60x0, ICM20608, ...)
const struct FloatRates MPU60X0_GYRO_SENS_F[4]
bool i2c_bypass
Bypass MPU I2C.
bool drdy_int_enable
Enable Data Ready Interrupt.
enum Mpu60x0ConfStatus init_status
init status
@ MPU60X0_CONF_I2C_SLAVES
@ MPU60X0_CONF_INT_ENABLE
@ MPU60X0_CONF_USER_RESET
enum Mpu60x0AccelRanges accel_range
g Range
uint8_t clk_sel
Clock select.
enum Mpu60x0ACCDLPF dlpf_cfg_acc
Digital Low Pass Filter for acceleremoter (ICM devices only)
void(* Mpu60x0ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
bool mpu60x0_configure_i2c_slaves(Mpu60x0ConfigSet mpu_set, void *mpu)
Configure I2C slaves of the MPU.
enum Mpu60x0GyroRanges gyro_range
deg/s Range
Register and address definitions for MPU-6000 and MPU-6050.
Mpu60x0DLPF
Digital Low Pass Filter Options DLFP is affecting both gyro and accels (on MPU not ICM),...
Mpu60x0GyroRanges
Selectable gyro range.
Mpu60x0AccelRanges
Selectable accel range.
Mpu60x0ACCDLPF
Digital Low Pass Filter Options DLFP specifically for the ICM device accelerometer.
Mpu60x0MstClk
I2C Master clock.
Paparazzi floating point algebra.
Paparazzi fixed point algebra.
static const struct usb_config_descriptor config
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.