Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
IMU driver for the MPU9250 using I2C. More...
#include "modules/imu/imu_mpu9250_i2c.h"
#include "modules/imu/imu.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/sys_time.h"
#include "modules/core/abi.h"
#include "generated/modules.h"
Go to the source code of this file.
Macros | |
#define | IMU_MPU9250_SMPLRT_DIV 9 |
#define | IMU_MPU9250_GYRO_LOWPASS_FILTER MPU9250_DLPF_GYRO_41HZ |
#define | IMU_MPU9250_ACCEL_LOWPASS_FILTER MPU9250_DLPF_ACCEL_41HZ |
#define | IMU_MPU9250_I2C_ADDR MPU9250_ADDR_ALT |
#define | IMU_MPU9250_CHAN_X 0 |
#define | IMU_MPU9250_CHAN_Y 1 |
#define | IMU_MPU9250_CHAN_Z 2 |
#define | IMU_MPU9250_X_SIGN 1 |
#define | IMU_MPU9250_Y_SIGN 1 |
#define | IMU_MPU9250_Z_SIGN 1 |
Functions | |
void | imu_mpu9250_init (void) |
void | imu_mpu9250_periodic (void) |
void | imu_mpu9250_event (void) |
Variables | |
struct ImuMpu9250 | imu_mpu9250 |
IMU driver for the MPU9250 using I2C.
Definition in file imu_mpu9250_i2c.c.
#define IMU_MPU9250_ACCEL_LOWPASS_FILTER MPU9250_DLPF_ACCEL_41HZ |
Definition at line 58 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_CHAN_X 0 |
Definition at line 77 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_CHAN_Y 1 |
Definition at line 81 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_CHAN_Z 2 |
Definition at line 85 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_GYRO_LOWPASS_FILTER MPU9250_DLPF_GYRO_41HZ |
Definition at line 57 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_I2C_ADDR MPU9250_ADDR_ALT |
Definition at line 71 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_SMPLRT_DIV 9 |
Definition at line 56 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_X_SIGN 1 |
Definition at line 90 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_Y_SIGN 1 |
Definition at line 94 of file imu_mpu9250_i2c.c.
#define IMU_MPU9250_Z_SIGN 1 |
Definition at line 98 of file imu_mpu9250_i2c.c.
void imu_mpu9250_event | ( | void | ) |
Definition at line 126 of file imu_mpu9250_i2c.c.
References Mpu9250_I2c::akm, Ak8963::data, Mpu9250_I2c::data_accel, Ak8963::data_available, Mpu9250_I2c::data_available, Mpu9250_I2c::data_rates, get_sys_time_usec(), imu_mpu9250, IMU_MPU9250_CHAN_X, IMU_MPU9250_CHAN_Y, IMU_MPU9250_CHAN_Z, IMU_MPU9250_ID, IMU_MPU9250_X_SIGN, IMU_MPU9250_Y_SIGN, IMU_MPU9250_Z_SIGN, ImuMpu9250::mpu, and mpu9250_i2c_event().
void imu_mpu9250_init | ( | void | ) |
Definition at line 105 of file imu_mpu9250_i2c.c.
References Mpu9250Config::accel_range, Mpu9250_I2c::config, Mpu9250Config::dlpf_accel_cfg, Mpu9250Config::dlpf_gyro_cfg, Mpu9250Config::gyro_range, imu_mpu9250, IMU_MPU9250_ACCEL_LOWPASS_FILTER, IMU_MPU9250_ACCEL_RANGE, IMU_MPU9250_GYRO_LOWPASS_FILTER, IMU_MPU9250_GYRO_RANGE, IMU_MPU9250_I2C_ADDR, IMU_MPU9250_ID, IMU_MPU9250_SMPLRT_DIV, imu_set_defaults_accel(), imu_set_defaults_gyro(), ImuMpu9250::mpu, MPU9250_ACCEL_SENS_FRAC, MPU9250_GYRO_SENS_FRAC, mpu9250_i2c_init(), and Mpu9250Config::smplrt_div.
void imu_mpu9250_periodic | ( | void | ) |
Definition at line 121 of file imu_mpu9250_i2c.c.
References imu_mpu9250, ImuMpu9250::mpu, and mpu9250_i2c_periodic().
struct ImuMpu9250 imu_mpu9250 |
Definition at line 1 of file imu_mpu9250_i2c.c.
Referenced by imu_mpu9250_event(), imu_mpu9250_init(), and imu_mpu9250_periodic().