91 switch (
config->init_status) {
138 if (
config->nb_slaves > 0) {
160 config->initialized =
true;
const struct Int32Rates MPU60X0_GYRO_SENS_FRAC[4][2]
const struct Int32Vect3 MPU60X0_ACCEL_SENS_FRAC[4][2]
void mpu60x0_set_default_config(struct Mpu60x0Config *c)
void mpu60x0_send_config(Mpu60x0ConfigSet mpu_set, void *mpu, struct Mpu60x0Config *config)
Configuration sequence called once before normal use.
const float MPU60X0_ACCEL_SENS[4]
const float MPU60X0_GYRO_SENS[4]
MPU-60X0 driver common interface (I2C and SPI).
#define MPU60X0_DEFAULT_AFS_SEL
Default accel full scale range +- 16g.
#define MPU60X0_ACCEL_SENS_8G_DEN
#define MPU60X0_ACCEL_SENS_8G_NUM
#define MPU60X0_GYRO_SENS_2000
#define MPU60X0_DEFAULT_FS_SEL
Default gyro full scale range +- 2000°/s.
#define MPU60X0_DEFAULT_SMPLRT_DIV
Default sample rate divider.
#define MPU60X0_DEFAULT_DLPF_CFG_ACC
Default internal sampling for accelerometer ICM devices only (1kHz, 99Hz LP Bandwidth)
#define MPU60X0_ACCEL_SENS_16G
#define MPU60X0_ACCEL_SENS_16G_NUM
#define MPU60X0_ACCEL_SENS_4G_NUM
#define MPU60X0_GYRO_SENS_1000_NUM
uint8_t nb_bytes
number of bytes to read starting with MPU60X0_REG_INT_STATUS
uint8_t smplrt_div
Sample rate divider.
uint8_t nb_slaves
number of used I2C slaves
#define MPU60X0_ACCEL_SENS_4G_DEN
#define MPU60X0_GYRO_SENS_2000_DEN
uint8_t nb_slave_init
number of already configured/initialized slaves
#define MPU60X0_GYRO_SENS_250
default gyro sensitivy from the datasheet sens = 1/ [LSB/(deg/s)] * pi/180 * 2^INT32_RATE_FRAC ex: MP...
#define MPU60X0_GYRO_SENS_500_DEN
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
enum Mpu60x0Type type
The type of sensor (MPU60x0, ICM20608, ...)
#define MPU60X0_DEFAULT_CLK_SEL
Default clock: PLL with X gyro reference.
#define MPU60X0_GYRO_SENS_250_NUM
#define MPU60X0_GYRO_SENS_500
#define MPU60X0_ACCEL_SENS_8G
#define MPU60X0_ACCEL_SENS_16G_DEN
#define MPU60X0_ACCEL_SENS_2G
default accel sensitivy from the datasheet sens = 9.81 [m/s^2] / [LSB/g] * 2^INT32_ACCEL_FRAC ex: MPU...
#define MPU60X0_GYRO_SENS_1000
bool i2c_bypass
Bypass MPU I2C.
#define MPU60X0_GYRO_SENS_2000_NUM
bool drdy_int_enable
Enable Data Ready Interrupt.
@ MPU60X0_CONF_I2C_SLAVES
@ MPU60X0_CONF_INT_ENABLE
@ MPU60X0_CONF_USER_RESET
#define MPU60X0_DEFAULT_DLPF_CFG
Default internal sampling (1kHz, 98Hz LP Bandwidth)
#define MPU60X0_GYRO_SENS_1000_DEN
#define MPU60X0_GYRO_SENS_250_DEN
#define MPU60X0_ACCEL_SENS_2G_DEN
enum Mpu60x0AccelRanges accel_range
g Range
#define MPU60X0_ACCEL_SENS_2G_NUM
uint8_t clk_sel
Clock select.
#define MPU60X0_ACCEL_SENS_4G
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.
#define MPU60X0_GYRO_SENS_500_NUM
enum Mpu60x0GyroRanges gyro_range
deg/s Range
#define MPU60X0_REG_USER_CTRL
#define MPU60X0_FIFO_RESET
#define MPU60X0_REG_GYRO_CONFIG
#define MPU60X0_REG_CONFIG
#define MPU60X0_REG_ACCEL_CONFIG2
#define MPU60X0_REG_PWR_MGMT_1
#define MPU60X0_SIG_COND_RESET
#define MPU60X0_REG_ACCEL_CONFIG
#define MPU60X0_REG_UNDOC1
#define MPU60X0_REG_INT_ENABLE
#define MPU60X0_REG_SMPLRT_DIV
#define MPU60X0_I2C_MST_RESET
static const struct usb_config_descriptor config