Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_aspirin2.c File Reference
#include <math.h>
#include "imu_aspirin2.h"
#include "mcu_periph/i2c.h"
#include "led.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
#include "../../peripherals/mpu60x0.h"
+ Include dependency graph for imu_aspirin2.c:

Go to the source code of this file.

Macros

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 
#define PERIODIC_FREQUENCY   60
 
#define MPU_OFFSET_GYRO   9
 
#define MPU_OFFSET_ACC   1
 

Functions

void imu_impl_init (void)
 
void imu_periodic (void)
 
void aspirin2_subsystem_downlink_raw (void)
 
void aspirin2_subsystem_event (void)
 

Variables

volatile bool_t mag_valid
 
volatile bool_t gyr_valid
 
volatile bool_t acc_valid
 
struct i2c_transaction aspirin2_mpu60x0
 
struct Imu imu
 global IMU state More...
 

Macro Definition Documentation

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 32 of file imu_aspirin2.c.

#define MPU_OFFSET_ACC   1
#define MPU_OFFSET_GYRO   9
#define PERIODIC_FREQUENCY   60

Function Documentation

void imu_periodic ( void  )

Definition at line 156 of file imu_aspirin2.c.

References aspirin2_mpu60x0, i2c_transaction::buf, i2c_transceive(), MPU60X0_ADDR, and MPU60X0_REG_INT_STATUS.

+ Here is the call graph for this function:

Variable Documentation

volatile bool_t acc_valid

Definition at line 43 of file imu_aspirin2.c.

Referenced by aspirin2_subsystem_event().

struct i2c_transaction aspirin2_mpu60x0

Definition at line 46 of file imu_aspirin2.c.

Referenced by aspirin2_subsystem_event(), imu_impl_init(), and imu_periodic().

volatile bool_t gyr_valid

Definition at line 42 of file imu_aspirin2.c.

Referenced by aspirin2_subsystem_event().

volatile bool_t mag_valid

Definition at line 41 of file imu_aspirin2.c.