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
mpu60x0_i2c.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  Mpu60x0_I2c
 

Macros

#define MPU60X0_BUFFER_EXT_LEN   16
 

Enumerations

enum  Mpu60x0I2cSlaveInitStatus {
  MPU60X0_I2C_CONF_UNINIT, MPU60X0_I2C_CONF_I2C_MST_DIS, MPU60X0_I2C_CONF_I2C_BYPASS_EN, MPU60X0_I2C_CONF_SLAVES_CONFIGURE,
  MPU60X0_I2C_CONF_I2C_BYPASS_DIS, MPU60X0_I2C_CONF_I2C_MST_CLK, MPU60X0_I2C_CONF_I2C_MST_DELAY, MPU60X0_I2C_CONF_I2C_SMPLRT,
  MPU60X0_I2C_CONF_I2C_MST_EN, MPU60X0_I2C_CONF_DONE
}
 

Functions

void mpu60x0_i2c_init (struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
 
void mpu60x0_i2c_start_configure (struct Mpu60x0_I2c *mpu)
 
void mpu60x0_i2c_read (struct Mpu60x0_I2c *mpu)
 
void mpu60x0_i2c_event (struct Mpu60x0_I2c *mpu)
 
static void mpu60x0_i2c_periodic (struct Mpu60x0_I2c *mpu)
 convenience function: read or start configuration if not already initialized More...
 

Detailed Description

Driver for the MPU-60X0 using I2C.

Definition in file mpu60x0_i2c.h.

Macro Definition Documentation

#define MPU60X0_BUFFER_EXT_LEN   16

Definition at line 39 of file mpu60x0_i2c.h.

Enumeration Type Documentation

Enumerator
MPU60X0_I2C_CONF_UNINIT 
MPU60X0_I2C_CONF_I2C_MST_DIS 
MPU60X0_I2C_CONF_I2C_BYPASS_EN 
MPU60X0_I2C_CONF_SLAVES_CONFIGURE 
MPU60X0_I2C_CONF_I2C_BYPASS_DIS 
MPU60X0_I2C_CONF_I2C_MST_CLK 
MPU60X0_I2C_CONF_I2C_MST_DELAY 
MPU60X0_I2C_CONF_I2C_SMPLRT 
MPU60X0_I2C_CONF_I2C_MST_EN 
MPU60X0_I2C_CONF_DONE 

Definition at line 41 of file mpu60x0_i2c.h.

Function Documentation

void mpu60x0_i2c_init ( struct Mpu60x0_I2c mpu,
struct i2c_periph i2c_p,
uint8_t  addr 
)
static void mpu60x0_i2c_periodic ( struct Mpu60x0_I2c mpu)
inlinestatic

convenience function: read or start configuration if not already initialized

Definition at line 78 of file mpu60x0_i2c.h.

References Mpu60x0_I2c::config, Mpu60x0Config::initialized, mpu60x0_i2c_read(), and mpu60x0_i2c_start_configure().

Referenced by imu_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mpu60x0_i2c_read ( struct Mpu60x0_I2c mpu)
void mpu60x0_i2c_start_configure ( struct Mpu60x0_I2c mpu)

Definition at line 60 of file mpu60x0_i2c.c.

References Mpu60x0_I2c::config, Mpu60x0_I2c::i2c_trans, I2CTransDone, I2CTransSuccess, Mpu60x0Config::init_status, MPU60X0_CONF_UNINIT, mpu60x0_i2c_write_to_reg(), mpu60x0_send_config(), and i2c_transaction::status.

Referenced by mpu60x0_i2c_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: