Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_ppzuav.c File Reference
#include "subsystems/imu.h"
#include "subsystems/abi.h"
#include "mcu_periph/i2c.h"
+ Include dependency graph for imu_ppzuav.c:

Go to the source code of this file.

Macros

#define IMU_PPZUAV_I2C_DEV   i2c0
 
#define IMU_PPZUAV_ACCEL_RATE   ADXL345_RATE_50HZ
 adxl345 accelerometer output rate, lowpass is set to half of rate More...
 
#define IMU_PPZUAV_GYRO_LOWPASS   ITG3200_DLPF_20HZ
 gyro internal lowpass frequency More...
 
#define IMU_PPZUAV_GYRO_SMPLRT_DIV   19
 gyro sample rate divider More...
 

Functions

void imu_impl_init (void)
 must be defined by underlying hardware More...
 
void imu_periodic (void)
 optional. More...
 
void imu_ppzuav_event (void)
 

Variables

struct ImuPpzuav imu_ppzuav
 

Macro Definition Documentation

#define IMU_PPZUAV_ACCEL_RATE   ADXL345_RATE_50HZ

adxl345 accelerometer output rate, lowpass is set to half of rate

Definition at line 43 of file imu_ppzuav.c.

Referenced by imu_impl_init().

#define IMU_PPZUAV_GYRO_LOWPASS   ITG3200_DLPF_20HZ

gyro internal lowpass frequency

Definition at line 56 of file imu_ppzuav.c.

Referenced by imu_impl_init().

#define IMU_PPZUAV_GYRO_SMPLRT_DIV   19

gyro sample rate divider

Definition at line 69 of file imu_ppzuav.c.

Referenced by imu_impl_init().

#define IMU_PPZUAV_I2C_DEV   i2c0

Definition at line 37 of file imu_ppzuav.c.

Referenced by imu_impl_init().

Function Documentation

void imu_impl_init ( void  )

must be defined by underlying hardware

must be defined by underlying hardware

Todo:
drdy int handling for adxl345
Todo:
eoc interrupt for itg3200, polling for now (including status reg)
Todo:
drdy int handling for adxl345
Todo:
eoc interrupt for itg3200, polling for now (including status reg)
Todo:
drdy int handling for adxl345

Definition at line 81 of file imu_ppzuav.c.

References ImuPpzuav::acc_adxl, ADXL345_ADDR, adxl345_i2c_init(), Adxl345_I2c::config, Itg3200::config, Itg3200Config::dlpf_cfg, ImuPpzuav::gyro_itg, HMC58XX_ADDR, hmc58xx_init(), HMC_TYPE_5843, IMU_PPZUAV_ACCEL_RATE, IMU_PPZUAV_GYRO_LOWPASS, IMU_PPZUAV_GYRO_SMPLRT_DIV, IMU_PPZUAV_I2C_DEV, ITG3200_ADDR, itg3200_init(), ImuPpzuav::mag_hmc, Adxl345Config::rate, Itg3200Config::smplrt_div, and Hmc58xx::type.

+ Here is the call graph for this function:

void imu_periodic ( void  )

optional.

If not provided by implementation, empty function is used

optional.

Read the MPU60x0 every periodic call and the HMC58XX every 10th call.

Definition at line 101 of file imu_ppzuav.c.

References ImuPpzuav::acc_adxl, adxl345_i2c_periodic(), ImuPpzuav::gyro_itg, hmc58xx_periodic(), imu_ppzuav, itg3200_periodic(), and ImuPpzuav::mag_hmc.

+ Here is the call graph for this function:

Variable Documentation

struct ImuPpzuav imu_ppzuav

Definition at line 79 of file imu_ppzuav.c.

Referenced by imu_periodic(), and imu_ppzuav_event().