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

MPU-60X0 driver common interface (I2C and SPI). More...

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

Go to the source code of this file.

Data Structures

struct  Mpu60x0I2cSlave
 
struct  Mpu60x0Config
 

Macros

#define MPU60X0_DEFAULT_SMPLRT_DIV   0
 Default sample rate divider. More...
 
#define MPU60X0_DEFAULT_FS_SEL   MPU60X0_GYRO_RANGE_2000
 Default gyro full scale range +- 2000°/s. More...
 
#define MPU60X0_DEFAULT_AFS_SEL   MPU60X0_ACCEL_RANGE_16G
 Default accel full scale range +- 16g. More...
 
#define MPU60X0_DEFAULT_DLPF_CFG   MPU60X0_DLPF_42HZ
 Default internal sampling (1kHz, 42Hz LP Bandwidth) More...
 
#define MPU60X0_DEFAULT_INT_CFG   1
 Default interrupt config: DATA_RDY_EN. More...
 
#define MPU60X0_DEFAULT_CLK_SEL   1
 Default clock: PLL with X gyro reference. More...
 

Typedefs

typedef void(* Mpu60x0ConfigSet )(void *mpu, uint8_t _reg, uint8_t _val)
 Configuration function prototype. More...
 
typedef bool_t(* Mpu60x0I2cSlaveConfigure )(Mpu60x0ConfigSet mpu_set, void *mpu)
 function prototype for configuration of a single I2C slave More...
 

Enumerations

enum  Mpu60x0ConfStatus {
  MPU60X0_CONF_UNINIT, MPU60X0_CONF_RESET, MPU60X0_CONF_USER_RESET, MPU60X0_CONF_PWR,
  MPU60X0_CONF_SD, MPU60X0_CONF_DLPF, MPU60X0_CONF_GYRO, MPU60X0_CONF_ACCEL,
  MPU60X0_CONF_I2C_SLAVES, MPU60X0_CONF_INT_ENABLE, MPU60X0_CONF_DONE
}
 

Functions

void mpu60x0_set_default_config (struct Mpu60x0Config *c)
 
void mpu60x0_send_config (Mpu60x0ConfigSet mpu_set, void *mpu, struct Mpu60x0Config *config)
 Configuration sequence called once before normal use. More...
 
bool_t mpu60x0_configure_i2c_slaves (Mpu60x0ConfigSet mpu_set, void *mpu)
 Configure I2C slaves of the MPU. More...
 

Detailed Description

MPU-60X0 driver common interface (I2C and SPI).

Definition in file mpu60x0.h.

Macro Definition Documentation

#define MPU60X0_DEFAULT_AFS_SEL   MPU60X0_ACCEL_RANGE_16G

Default accel full scale range +- 16g.

Definition at line 41 of file mpu60x0.h.

Referenced by mpu60x0_set_default_config().

#define MPU60X0_DEFAULT_CLK_SEL   1

Default clock: PLL with X gyro reference.

Definition at line 47 of file mpu60x0.h.

Referenced by mpu60x0_set_default_config().

#define MPU60X0_DEFAULT_DLPF_CFG   MPU60X0_DLPF_42HZ

Default internal sampling (1kHz, 42Hz LP Bandwidth)

Definition at line 43 of file mpu60x0.h.

Referenced by mpu60x0_set_default_config().

#define MPU60X0_DEFAULT_FS_SEL   MPU60X0_GYRO_RANGE_2000

Default gyro full scale range +- 2000°/s.

Definition at line 39 of file mpu60x0.h.

Referenced by mpu60x0_set_default_config().

#define MPU60X0_DEFAULT_INT_CFG   1

Default interrupt config: DATA_RDY_EN.

Definition at line 45 of file mpu60x0.h.

#define MPU60X0_DEFAULT_SMPLRT_DIV   0

Default sample rate divider.

Definition at line 37 of file mpu60x0.h.

Referenced by mpu60x0_set_default_config().

Typedef Documentation

typedef void(* Mpu60x0ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)

Configuration function prototype.

Definition at line 64 of file mpu60x0.h.

typedef bool_t(* Mpu60x0I2cSlaveConfigure)(Mpu60x0ConfigSet mpu_set, void *mpu)

function prototype for configuration of a single I2C slave

Definition at line 67 of file mpu60x0.h.

Enumeration Type Documentation

Enumerator
MPU60X0_CONF_UNINIT 
MPU60X0_CONF_RESET 
MPU60X0_CONF_USER_RESET 
MPU60X0_CONF_PWR 
MPU60X0_CONF_SD 
MPU60X0_CONF_DLPF 
MPU60X0_CONF_GYRO 
MPU60X0_CONF_ACCEL 
MPU60X0_CONF_I2C_SLAVES 
MPU60X0_CONF_INT_ENABLE 
MPU60X0_CONF_DONE 

Definition at line 49 of file mpu60x0.h.

Function Documentation