Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the MPU-60X0 using I2C. More...
#include "peripherals/mpu60x0_i2c.h"
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... | |
Driver for the MPU-60X0 using I2C.
Definition in file mpu60x0_i2c.c.
#define Int16FromBuf | ( | _buf, | |
_idx | |||
) | ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1])) |
Definition at line 80 of file mpu60x0_i2c.c.
bool mpu60x0_configure_i2c_slaves | ( | Mpu60x0ConfigSet | mpu_set, |
void * | mpu | ||
) |
configure the registered I2C slaves
Configure I2C slaves of the MPU.
Definition at line 135 of file mpu60x0_i2c.c.
void mpu60x0_i2c_event | ( | struct Mpu60x0_I2c * | mpu | ) |
Definition at line 82 of file mpu60x0_i2c.c.
References i2c_transaction::buf, Mpu60x0_I2c::config, Mpu60x0_I2c::data_accel, Mpu60x0_I2c::data_available, Mpu60x0_I2c::data_ext, Mpu60x0_I2c::data_rates, FALSE, Mpu60x0Config::i2c_bypass, Mpu60x0_I2c::i2c_trans, I2CTransDone, I2CTransFailed, I2CTransSuccess, Mpu60x0Config::init_status, Mpu60x0Config::initialized, Int16FromBuf, MPU60X0_CONF_UNINIT, mpu60x0_i2c_write_to_reg(), mpu60x0_send_config(), Mpu60x0Config::nb_bytes, Mpu60x0Config::nb_slaves, i2c_transaction::status, and Mpu60x0_I2c::temp.
Referenced by imu_apogee_event(), imu_bebop_event(), imu_disco_event(), and imu_mpu_i2c_event().
void mpu60x0_i2c_init | ( | struct Mpu60x0_I2c * | mpu, |
struct i2c_periph * | i2c_p, | ||
uint8_t | addr | ||
) |
Definition at line 31 of file mpu60x0_i2c.c.
References Mpu60x0_I2c::config, Mpu60x0_I2c::data_available, Mpu60x0_I2c::i2c_p, Mpu60x0_I2c::i2c_trans, I2CTransDone, Mpu60x0Config::init_status, Mpu60x0Config::initialized, MPU60X0_CONF_UNINIT, MPU60X0_I2C_CONF_UNINIT, mpu60x0_set_default_config(), i2c_transaction::slave_addr, Mpu60x0_I2c::slave_init_status, and i2c_transaction::status.
Referenced by imu_apogee_init(), imu_bebop_init(), imu_disco_init(), and imu_mpu_i2c_init().
void mpu60x0_i2c_read | ( | struct Mpu60x0_I2c * | mpu | ) |
Definition at line 71 of file mpu60x0_i2c.c.
References i2c_transaction::buf, Mpu60x0_I2c::config, Mpu60x0_I2c::i2c_p, Mpu60x0_I2c::i2c_trans, i2c_transceive(), I2CTransDone, Mpu60x0Config::initialized, MPU60X0_REG_INT_STATUS, Mpu60x0Config::nb_bytes, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by mpu60x0_i2c_periodic().
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 mpu60x0_i2c_periodic().
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().