Paparazzi UAS  v5.15_devel-187-g731cc33
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bmi088_i2c.h File Reference

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"
+ Include dependency graph for bmi088_i2c.h:
+ This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Driver for the BMI088 using I2C.

Definition in file bmi088_i2c.h.


Data Structure Documentation

struct Bmi088_I2c

Definition at line 37 of file bmi088_i2c.h.

+ Collaboration diagram for Bmi088_I2c:
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

Function Documentation

void bmi088_i2c_init ( struct Bmi088_I2c bmi,
struct i2c_periph i2c_p,
uint8_t  gyro_addr,
uint8_t  accel_addr 
)
static void bmi088_i2c_periodic ( struct Bmi088_I2c bmi)
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bmi088_i2c_read ( struct Bmi088_I2c bmi)
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: