36 #define MPU9250_DEFAULT_SMPLRT_DIV 0
37 #define MPU9250_DEFAULT_FS_SEL MPU9250_GYRO_RANGE_1000
39 #define MPU9250_DEFAULT_AFS_SEL MPU9250_ACCEL_RANGE_8G
41 #define MPU9250_DEFAULT_DLPF_ACCEL_CFG MPU9250_DLPF_ACCEL_41HZ
43 #define MPU9250_DEFAULT_DLPF_GYRO_CFG MPU9250_DLPF_GYRO_41HZ
45 #define MPU9250_DEFAULT_INT_CFG 1
47 #define MPU9250_DEFAULT_CLK_SEL 1
51 #ifndef MPU9250_I2C_NB_SLAVES
52 #define MPU9250_I2C_NB_SLAVES 5
enum Mpu9250MstClk i2c_mst_clk
MPU I2C master clock speed.
Mpu9250I2cSlaveConfigure configure
bool drdy_int_enable
Enable Data Ready Interrupt.
enum Mpu9250DLPFGyro dlpf_gyro_cfg
Digital Low Pass Filter for gyroscope.
Mpu9250GyroRanges
Selectable gyro range.
enum Mpu9250GyroRanges gyro_range
deg/s Range
enum Mpu9250ConfStatus init_status
init status
uint8_t nb_bytes
number of bytes to read starting with MPU9250_REG_INT_STATUS
bool(* Mpu9250I2cSlaveConfigure)(Mpu9250ConfigSet mpu_set, void *mpu)
function prototype for configuration of a single I2C slave
uint8_t clk_sel
Clock select.
Mpu9250MstClk
I2C Master clock.
enum Mpu9250DLPFAccel dlpf_accel_cfg
Digital Low Pass Filter for accelerometer.
bool i2c_bypass
Bypass MPU I2C.
bool mpu9250_configure_i2c_slaves(Mpu9250ConfigSet mpu_set, void *mpu)
Configure I2C slaves of the MPU.
void mpu9250_send_config(Mpu9250ConfigSet mpu_set, void *mpu, struct Mpu9250Config *config)
Configuration sequence called once before normal use.
void(* Mpu9250ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
uint8_t nb_slaves
number of used I2C slaves
Register and address definitions for MPU-9250.
enum Mpu9250AccelRanges accel_range
g Range
void mpu9250_set_default_config(struct Mpu9250Config *c)
struct Mpu9250I2cSlave slaves[MPU9250_I2C_NB_SLAVES]
I2C slaves.
Mpu9250AccelRanges
Selectable accel range.
static const struct usb_config_descriptor config
uint8_t nb_slave_init
number of already configured/initialized slaves
#define MPU9250_I2C_NB_SLAVES
uint8_t smplrt_div
Sample rate divider.
bool initialized
config done flag
Mpu9250DLPFGyro
Digital Low Pass Filter Options.
uint8_t i2c_mst_delay
MPU I2C slaves delayed sample rate.