Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mpu60x0_i2c.c File Reference

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

+ Include dependency graph for mpu60x0_i2c.c:

Go to the source code of this file.

Macros

#define Int16FromBuf(_buf, _idx)   ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
 

Functions

void mpu60x0_i2c_init (struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
 
static void mpu60x0_i2c_write_to_reg (void *mpu, uint8_t _reg, uint8_t _val)
 
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)
 
bool mpu60x0_configure_i2c_slaves (Mpu60x0ConfigSet mpu_set, void *mpu)
 configure the registered I2C slaves More...
 

Detailed Description

Driver for the MPU-60X0 using I2C.

Definition in file mpu60x0_i2c.c.

Macro Definition Documentation

#define Int16FromBuf (   _buf,
  _idx 
)    ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))

Definition at line 80 of file mpu60x0_i2c.c.

Referenced by mpu60x0_i2c_event().

Function Documentation

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

Definition at line 61 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 imu_krooz_periodic(), and mpu60x0_i2c_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mpu60x0_i2c_write_to_reg ( void *  mpu,
uint8_t  _reg,
uint8_t  _val 
)
static

Definition at line 52 of file mpu60x0_i2c.c.

References i2c_transaction::buf, Mpu60x0_I2c::i2c_p, Mpu60x0_I2c::i2c_trans, i2c_transmit(), and i2c_transaction::slave_addr.

Referenced by mpu60x0_i2c_event(), and mpu60x0_i2c_start_configure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: