Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
imu_mpu9250_spi.h File Reference
#include "std.h"
#include "generated/airframe.h"
#include "subsystems/imu.h"
#include "peripherals/mpu9250_spi.h"
+ Include dependency graph for imu_mpu9250_spi.h:

Go to the source code of this file.

Data Structures

struct  ImuMpu9250
 

Macros

#define IMU_MPU9250_GYRO_RANGE   MPU9250_GYRO_RANGE_1000
 
#define IMU_MPU9250_ACCEL_RANGE   MPU9250_ACCEL_RANGE_8G
 
#define IMU_GYRO_P_SENS   MPU9250_GYRO_SENS[IMU_MPU9250_GYRO_RANGE]
 
#define IMU_GYRO_P_SENS_NUM   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][0]
 
#define IMU_GYRO_P_SENS_DEN   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][1]
 
#define IMU_GYRO_Q_SENS   MPU9250_GYRO_SENS[IMU_MPU9250_GYRO_RANGE]
 
#define IMU_GYRO_Q_SENS_NUM   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][0]
 
#define IMU_GYRO_Q_SENS_DEN   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][1]
 
#define IMU_GYRO_R_SENS   MPU9250_GYRO_SENS[IMU_MPU9250_GYRO_RANGE]
 
#define IMU_GYRO_R_SENS_NUM   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][0]
 
#define IMU_GYRO_R_SENS_DEN   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][1]
 
#define IMU_ACCEL_X_SENS   MPU9250_ACCEL_SENS[IMU_MPU9250_ACCEL_RANGE]
 
#define IMU_ACCEL_X_SENS_NUM   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][0]
 
#define IMU_ACCEL_X_SENS_DEN   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][1]
 
#define IMU_ACCEL_Y_SENS   MPU9250_ACCEL_SENS[IMU_MPU9250_ACCEL_RANGE]
 
#define IMU_ACCEL_Y_SENS_NUM   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][0]
 
#define IMU_ACCEL_Y_SENS_DEN   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][1]
 
#define IMU_ACCEL_Z_SENS   MPU9250_ACCEL_SENS[IMU_MPU9250_ACCEL_RANGE]
 
#define IMU_ACCEL_Z_SENS_NUM   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][0]
 
#define IMU_ACCEL_Z_SENS_DEN   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][1]
 

Functions

void imu_mpu9250_init (void)
 
void imu_mpu9250_periodic (void)
 
void imu_mpu9250_event (void)
 

Variables

struct ImuMpu9250 imu_mpu9250
 

Detailed Description

IMU driver for the MPU9250 using SPI

Definition in file imu_mpu9250_spi.h.


Data Structure Documentation

◆ ImuMpu9250

struct ImuMpu9250

Definition at line 73 of file imu_mpu9250_i2c.h.

+ Collaboration diagram for ImuMpu9250:
Data Fields
struct Mpu9250_I2c mpu
struct Mpu9250_Spi mpu
volatile bool slave4_ready
volatile uint8_t wait_slave4_rx_buf[2]
struct spi_transaction wait_slave4_trans
volatile uint8_t wait_slave4_tx_buf[1]

Macro Definition Documentation

◆ IMU_ACCEL_X_SENS

#define IMU_ACCEL_X_SENS   MPU9250_ACCEL_SENS[IMU_MPU9250_ACCEL_RANGE]

Definition at line 61 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_X_SENS_DEN

#define IMU_ACCEL_X_SENS_DEN   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][1]

Definition at line 63 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_X_SENS_NUM

#define IMU_ACCEL_X_SENS_NUM   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][0]

Definition at line 62 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_Y_SENS

#define IMU_ACCEL_Y_SENS   MPU9250_ACCEL_SENS[IMU_MPU9250_ACCEL_RANGE]

Definition at line 64 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_Y_SENS_DEN

#define IMU_ACCEL_Y_SENS_DEN   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][1]

Definition at line 66 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_Y_SENS_NUM

#define IMU_ACCEL_Y_SENS_NUM   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][0]

Definition at line 65 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_Z_SENS

#define IMU_ACCEL_Z_SENS   MPU9250_ACCEL_SENS[IMU_MPU9250_ACCEL_RANGE]

Definition at line 67 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_Z_SENS_DEN

#define IMU_ACCEL_Z_SENS_DEN   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][1]

Definition at line 69 of file imu_mpu9250_spi.h.

◆ IMU_ACCEL_Z_SENS_NUM

#define IMU_ACCEL_Z_SENS_NUM   MPU9250_ACCEL_SENS_FRAC[IMU_MPU9250_ACCEL_RANGE][0]

Definition at line 68 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_P_SENS

#define IMU_GYRO_P_SENS   MPU9250_GYRO_SENS[IMU_MPU9250_GYRO_RANGE]

Definition at line 48 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_P_SENS_DEN

#define IMU_GYRO_P_SENS_DEN   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][1]

Definition at line 50 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_P_SENS_NUM

#define IMU_GYRO_P_SENS_NUM   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][0]

Definition at line 49 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_Q_SENS

#define IMU_GYRO_Q_SENS   MPU9250_GYRO_SENS[IMU_MPU9250_GYRO_RANGE]

Definition at line 51 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_Q_SENS_DEN

#define IMU_GYRO_Q_SENS_DEN   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][1]

Definition at line 53 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_Q_SENS_NUM

#define IMU_GYRO_Q_SENS_NUM   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][0]

Definition at line 52 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_R_SENS

#define IMU_GYRO_R_SENS   MPU9250_GYRO_SENS[IMU_MPU9250_GYRO_RANGE]

Definition at line 54 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_R_SENS_DEN

#define IMU_GYRO_R_SENS_DEN   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][1]

Definition at line 56 of file imu_mpu9250_spi.h.

◆ IMU_GYRO_R_SENS_NUM

#define IMU_GYRO_R_SENS_NUM   MPU9250_GYRO_SENS_FRAC[IMU_MPU9250_GYRO_RANGE][0]

Definition at line 55 of file imu_mpu9250_spi.h.

◆ IMU_MPU9250_ACCEL_RANGE

#define IMU_MPU9250_ACCEL_RANGE   MPU9250_ACCEL_RANGE_8G

Definition at line 43 of file imu_mpu9250_spi.h.

◆ IMU_MPU9250_GYRO_RANGE

#define IMU_MPU9250_GYRO_RANGE   MPU9250_GYRO_RANGE_1000

Definition at line 39 of file imu_mpu9250_spi.h.

Function Documentation

◆ imu_mpu9250_event()

◆ imu_mpu9250_init()

◆ imu_mpu9250_periodic()

void imu_mpu9250_periodic ( void  )

Definition at line 42 of file imu_mpu9250.c.

References imu_mpu9250, ImuMpu9250::mpu, mpu9250, mpu9250_i2c_periodic(), and mpu9250_spi_periodic().

+ Here is the call graph for this function:

Variable Documentation

◆ imu_mpu9250