Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the Aspirin v1.x IMU using SPI for the accelerometer. More...
#include "subsystems/imu.h"
#include "subsystems/abi.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/spi.h"
Go to the source code of this file.
Macros | |
#define | ASPIRIN_SPI_SLAVE_IDX SPI_SLAVE2 |
#define | ASPIRIN_SPI_DEV spi2 |
#define | ASPIRIN_I2C_DEV i2c2 |
#define | ASPIRIN_ACCEL_RATE ADXL345_RATE_800HZ |
#define | ASPIRIN_GYRO_LOWPASS ITG3200_DLPF_256HZ |
#define | ASPIRIN_GYRO_SMPLRT_DIV 14 |
Functions | |
void | imu_impl_init (void) |
must be defined by underlying hardware More... | |
void | imu_periodic (void) |
optional. More... | |
void | imu_aspirin_event (void) |
Variables | |
struct ImuAspirin | imu_aspirin |
Driver for the Aspirin v1.x IMU using SPI for the accelerometer.
Driver for the Aspirin v1.x IMU using I2C for the accelerometer.
Definition in file imu_aspirin.c.
#define ASPIRIN_ACCEL_RATE ADXL345_RATE_800HZ |
Definition at line 51 of file imu_aspirin.c.
Referenced by imu_impl_init().
#define ASPIRIN_GYRO_LOWPASS ITG3200_DLPF_256HZ |
Definition at line 58 of file imu_aspirin.c.
Referenced by imu_impl_init().
#define ASPIRIN_GYRO_SMPLRT_DIV 14 |
Definition at line 59 of file imu_aspirin.c.
Referenced by imu_impl_init().
#define ASPIRIN_I2C_DEV i2c2 |
Definition at line 46 of file imu_aspirin.c.
Referenced by imu_impl_init().
#define ASPIRIN_SPI_DEV spi2 |
Definition at line 41 of file imu_aspirin.c.
Referenced by imu_impl_init().
#define ASPIRIN_SPI_SLAVE_IDX SPI_SLAVE2 |
Definition at line 36 of file imu_aspirin.c.
Referenced by imu_impl_init().
void imu_aspirin_event | ( | void | ) |
Definition at line 118 of file imu_aspirin.c.
References ImuAspirin::acc_adxl, Imu::accel, Imu::accel_unscaled, ImuAspirin::accel_valid, adxl345_spi_event(), Adxl345_Spi::data, Hmc58xx::data, Itg3200::data, Adxl345_Spi::data_available, Hmc58xx::data_available, Itg3200::data_available, FALSE, get_sys_time_usec(), Imu::gyro, ImuAspirin::gyro_itg, Imu::gyro_unscaled, ImuAspirin::gyro_valid, hmc58xx_event(), imu, imu_aspirin, IMU_ASPIRIN_ID, imu_scale_accel(), imu_scale_gyro(), imu_scale_mag(), itg3200_event(), Imu::mag, ImuAspirin::mag_hmc, Imu::mag_unscaled, ImuAspirin::mag_valid, RATES_COPY, TRUE, VECT3_COPY, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.
void imu_impl_init | ( | void | ) |
must be defined by underlying hardware
Definition at line 68 of file imu_aspirin.c.
References ImuAspirin::acc_adxl, ImuAspirin::accel_valid, adxl345_spi_init(), ASPIRIN_ACCEL_RATE, ASPIRIN_GYRO_LOWPASS, ASPIRIN_GYRO_SMPLRT_DIV, ASPIRIN_I2C_DEV, ASPIRIN_SPI_DEV, ASPIRIN_SPI_SLAVE_IDX, Adxl345_Spi::config, Itg3200::config, Itg3200Config::dlpf_cfg, FALSE, ImuAspirin::gyro_itg, ImuAspirin::gyro_valid, HMC58XX_ADDR, hmc58xx_init(), HMC_TYPE_5843, imu_aspirin_arch_init(), ITG3200_ADDR, itg3200_init(), ImuAspirin::mag_hmc, ImuAspirin::mag_valid, Adxl345Config::rate, Itg3200Config::smplrt_div, and Hmc58xx::type.
void imu_periodic | ( | void | ) |
optional.
If not provided by implementation, empty function is used
Definition at line 107 of file imu_aspirin.c.
References ImuAspirin::acc_adxl, adxl345_spi_periodic(), ImuAspirin::gyro_itg, hmc58xx_periodic(), imu_aspirin, itg3200_periodic(), and ImuAspirin::mag_hmc.
struct ImuAspirin imu_aspirin |
Definition at line 66 of file imu_aspirin.c.
Referenced by exti15_10_isr(), imu_aspirin_event(), and imu_periodic().