33 #define DISCO_MAG_I2C_DEV i2c1
35 #define DISCO_MPU_I2C_DEV i2c2
39 #if !defined DISCO_LOWPASS_FILTER && !defined DISCO_SMPLRT_DIV
40 #if (PERIODIC_FREQUENCY == 60) || (PERIODIC_FREQUENCY == 120)
44 #define DISCO_LOWPASS_FILTER MPU60X0_DLPF_42HZ
45 #define DISCO_SMPLRT_DIV 9
46 PRINT_CONFIG_MSG(
"Gyro/Accel output rate is 100Hz at 1kHz internal sampling")
49 PRINT_CONFIG_VAR(DISCO_SMPLRT_DIV)
50 PRINT_CONFIG_VAR(DISCO_LOWPASS_FILTER)
union Mpu60x0_I2c::@314 data_rates
union Mpu60x0_I2c::@313 data_accel
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
struct Mpu60x0Config config
void imu_disco_event(void)
Handle all the events of the Disco IMU components.
#define VECT3_ASSIGN(_a, _x, _y, _z)
#define RATES_ASSIGN(_ra, _p, _q, _r)
Main include for ABI (AirBorneInterface).
uint8_t smplrt_div
Sample rate divider.
void ak8963_init(struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
Initialize AK8963 struct.
struct Imu imu
global IMU state
enum Mpu60x0GyroRanges gyro_range
deg/s Range
struct Ak8963 ak
The AK8963 mag.
enum Mpu60x0AccelRanges accel_range
g Range
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
struct ImuDisco imu_disco
Disco IMU data.
#define DISCO_ACCEL_RANGE
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
Inertial Measurement Unit interface.
void imu_scale_gyro(struct Imu *_imu)
void ak8963_event(struct Ak8963 *ak)
void imu_scale_mag(struct Imu *_imu)
static void ak8963_periodic(struct Ak8963 *ak)
convenience function: read or start configuration if not already initialized
#define DISCO_MPU_I2C_DEV
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
void imu_scale_accel(struct Imu *_imu)
volatile bool data_available
data ready flag
void imu_disco_init(void)
Disco IMU initializtion of the MPU-60x0 and HMC58xx.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
#define DISCO_MAG_I2C_DEV
void imu_disco_periodic(void)
Handle all the periodic tasks of the Disco IMU components.
Everything that is in the disco IMU.
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
volatile bool data_available
data ready flag
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
struct Mpu60x0_I2c mpu
The MPU gyro/accel device.