Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mpu60x0_spi.h File Reference

Driver for the MPU-60X0 using SPI. More...

#include "std.h"
#include "math/pprz_algebra_int.h"
#include "mcu_periph/spi.h"
#include "peripherals/mpu60x0.h"
+ Include dependency graph for mpu60x0_spi.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Mpu60x0_Spi
union  Mpu60x0_Spi.data_accel
union  Mpu60x0_Spi.data_rates


#define MPU60X0_BUFFER_LEN   32
#define MPU60X0_BUFFER_EXT_LEN   16


enum  Mpu60x0SpiSlaveInitStatus {


void mpu60x0_spi_init (struct Mpu60x0_Spi *mpu, struct spi_periph *spi_p, uint8_t addr)
void mpu60x0_spi_start_configure (struct Mpu60x0_Spi *mpu)
void mpu60x0_spi_read (struct Mpu60x0_Spi *mpu)
void mpu60x0_spi_event (struct Mpu60x0_Spi *mpu)
static void mpu60x0_spi_periodic (struct Mpu60x0_Spi *mpu)
 convenience function: read or start configuration if not already initialized More...

Detailed Description

Driver for the MPU-60X0 using SPI.

Definition in file mpu60x0_spi.h.

Data Structure Documentation

struct Mpu60x0_Spi

Definition at line 51 of file mpu60x0_spi.h.

+ Collaboration diagram for Mpu60x0_Spi:
Data Fields
struct Mpu60x0Config config
union Mpu60x0_Spi data_accel
volatile bool data_available data ready flag
uint8_t data_ext[MPU60X0_BUFFER_EXT_LEN]
union Mpu60x0_Spi data_rates
volatile uint8_t rx_buf[MPU60X0_BUFFER_LEN]
enum Mpu60x0SpiSlaveInitStatus slave_init_status
struct spi_periph * spi_p
struct spi_transaction spi_trans
float temp temperature in degrees Celcius
volatile uint8_t tx_buf[2]
union Mpu60x0_Spi.data_accel

Definition at line 57 of file mpu60x0_spi.h.

Data Fields
int16_t value[3] accel data values accessible by channel index
struct Int16Vect3 vect accel data vector in accel coordinate system
union Mpu60x0_Spi.data_rates

Definition at line 61 of file mpu60x0_spi.h.

Data Fields
struct Int16Rates rates rates data as angular rates in gyro coordinate system
int16_t value[3] rates data values accessible by channel index

Macro Definition Documentation

#define MPU60X0_BUFFER_EXT_LEN   16

Definition at line 40 of file mpu60x0_spi.h.

#define MPU60X0_BUFFER_LEN   32

Definition at line 39 of file mpu60x0_spi.h.

Referenced by mpu60x0_spi_init().

Enumeration Type Documentation


Definition at line 42 of file mpu60x0_spi.h.

Function Documentation

static void mpu60x0_spi_periodic ( struct Mpu60x0_Spi mpu)

convenience function: read or start configuration if not already initialized

Definition at line 78 of file mpu60x0_spi.h.

References Mpu60x0_Spi::config, Mpu60x0Config::initialized, mpu60x0_spi_read(), and mpu60x0_spi_start_configure().

Referenced by imu_aspirin2_periodic(), imu_mpu_hmc_periodic(), imu_mpu_spi_periodic(), and imu_px4fmu_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mpu60x0_spi_read ( struct Mpu60x0_Spi mpu)