Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the BMI088 using I2C. More...
#include "std.h"
#include "math/pprz_algebra_int.h"
#include "mcu_periph/i2c.h"
#include "peripherals/bmi088.h"
Go to the source code of this file.
Data Structures | |
struct | Bmi088_I2c |
union | Bmi088_I2c.data_accel |
union | Bmi088_I2c.data_rates |
Functions | |
void | bmi088_i2c_init (struct Bmi088_I2c *bmi, struct i2c_periph *i2c_p, uint8_t gyro_addr, uint8_t accel_addr) |
void | bmi088_i2c_start_configure (struct Bmi088_I2c *bmi) |
void | bmi088_i2c_read (struct Bmi088_I2c *bmi) |
void | bmi088_i2c_event (struct Bmi088_I2c *bmi) |
static void | bmi088_i2c_periodic (struct Bmi088_I2c *bmi) |
convenience function: read or start configuration if not already initialized More... | |
Driver for the BMI088 using I2C.
Definition in file bmi088_i2c.h.
struct Bmi088_I2c |
Definition at line 37 of file bmi088_i2c.h.
Data Fields | ||
---|---|---|
volatile bool | accel_available | accel data ready flag |
struct i2c_transaction | accel_trans | i2c transaction for accel |
struct Bmi088Config | config | |
union Bmi088_I2c | data_accel | |
union Bmi088_I2c | data_rates | |
volatile bool | gyro_available | gyro data ready flag |
struct i2c_transaction | gyro_trans | i2c transaction for gyro |
struct i2c_periph * | i2c_p |
union Bmi088_I2c.data_accel |
Definition at line 43 of file bmi088_i2c.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 Bmi088_I2c.data_rates |
Definition at line 47 of file bmi088_i2c.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 |
void bmi088_i2c_event | ( | struct Bmi088_I2c * | bmi | ) |
Definition at line 93 of file bmi088_i2c.c.
References Bmi088_I2c::accel_available, Bmi088_I2c::accel_trans, BMI088_CONF_ACCEL_PWR_CTRL, BMI088_CONF_UNINIT, bmi088_i2c_write_to_reg(), bmi088_send_config(), i2c_transaction::buf, Bmi088_I2c::config, Bmi088_I2c::data_accel, Bmi088_I2c::data_rates, Bmi088_I2c::gyro_available, Bmi088_I2c::gyro_trans, I2CTransDone, I2CTransFailed, I2CTransSuccess, Bmi088Config::init_status, Bmi088Config::initialized, Int16FromBuf, and i2c_transaction::status.
Referenced by imu_bmi088_event().
void bmi088_i2c_init | ( | struct Bmi088_I2c * | bmi, |
struct i2c_periph * | i2c_p, | ||
uint8_t | gyro_addr, | ||
uint8_t | accel_addr | ||
) |
Definition at line 30 of file bmi088_i2c.c.
References Bmi088_I2c::accel_available, Bmi088_I2c::accel_trans, BMI088_CONF_UNINIT, bmi088_set_default_config(), Bmi088_I2c::config, Bmi088_I2c::gyro_available, Bmi088_I2c::gyro_trans, Bmi088_I2c::i2c_p, I2CTransDone, Bmi088Config::init_status, Bmi088Config::initialized, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by imu_bmi088_init().
|
inlinestatic |
convenience function: read or start configuration if not already initialized
Definition at line 61 of file bmi088_i2c.h.
References bmi088_i2c_read(), bmi088_i2c_start_configure(), Bmi088_I2c::config, and Bmi088Config::initialized.
Referenced by imu_bmi088_periodic().
void bmi088_i2c_read | ( | struct Bmi088_I2c * | bmi | ) |
Definition at line 77 of file bmi088_i2c.c.
References Bmi088_I2c::accel_trans, BMI088_ACCEL_X_LSB, BMI088_GYRO_RATE_X_LSB, i2c_transaction::buf, Bmi088_I2c::config, Bmi088_I2c::gyro_trans, Bmi088_I2c::i2c_p, i2c_transceive(), I2CTransDone, Bmi088Config::initialized, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by bmi088_i2c_periodic().
void bmi088_i2c_start_configure | ( | struct Bmi088_I2c * | bmi | ) |
Definition at line 67 of file bmi088_i2c.c.
References Bmi088_I2c::accel_trans, BMI088_CONF_UNINIT, bmi088_i2c_write_to_reg(), bmi088_send_config(), Bmi088_I2c::config, I2CTransDone, I2CTransSuccess, Bmi088Config::init_status, and i2c_transaction::status.
Referenced by bmi088_i2c_periodic().