Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
lsm6ds33_i2c.h File Reference

Driver for the accelerometer and gyrometer LSM6DS33. More...

#include "std.h"
#include "math/pprz_algebra_int.h"
#include "mcu_periph/i2c.h"
#include "peripherals/lsm6ds33.h"
+ Include dependency graph for lsm6ds33_i2c.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Lsm6_I2c
 
union  Lsm6_I2c.data_xl
 
union  Lsm6_I2c.data_g
 

Functions

void lsm6_i2c_init (struct Lsm6_I2c *lsm, struct i2c_periph *i2c_p, uint8_t addr)
 
void lsm6_i2c_start_configure (struct Lsm6_I2c *lsm)
 
void lsm6_i2c_read (struct Lsm6_I2c *lsm)
 
void lsm6_i2c_event (struct Lsm6_I2c *lsm)
 
static void lsm6_i2c_periodic (struct Lsm6_I2c *lsm)
 convenience function: read or start configuration if not already initialized More...
 

Detailed Description

Driver for the accelerometer and gyrometer LSM6DS33.

Definition in file lsm6ds33_i2c.h.


Data Structure Documentation

◆ Lsm6_I2c

struct Lsm6_I2c

Definition at line 38 of file lsm6ds33_i2c.h.

+ Collaboration diagram for Lsm6_I2c:
Data Fields
struct Lsm6Config config
volatile bool data_available data ready flag
union Lsm6_I2c data_g
union Lsm6_I2c data_xl
struct i2c_periph * i2c_p
struct i2c_transaction i2c_trans
enum Lsm6ConfStatus init_status init status
bool initialized config done flag

◆ Lsm6_I2c.data_xl

union Lsm6_I2c.data_xl

Definition at line 44 of file lsm6ds33_i2c.h.

Data Fields
int16_t value[3] data values accessible by channel index
struct Int16Vect3 vect data vector in accel coordinate system

◆ Lsm6_I2c.data_g

union Lsm6_I2c.data_g

Definition at line 48 of file lsm6ds33_i2c.h.

Data Fields
struct Int16Rates rates data as angular rates in gyroscop coordinate system
int16_t value[3] data values accessible by channel index

Function Documentation

◆ lsm6_i2c_event()

◆ lsm6_i2c_init()

void lsm6_i2c_init ( struct Lsm6_I2c lsm,
struct i2c_periph i2c_p,
uint8_t  addr 
)

◆ lsm6_i2c_periodic()

static void lsm6_i2c_periodic ( struct Lsm6_I2c lsm)
inlinestatic

convenience function: read or start configuration if not already initialized

Definition at line 62 of file lsm6ds33_i2c.h.

References Lsm6_I2c::initialized, lsm6_i2c_read(), and lsm6_i2c_start_configure().

+ Here is the call graph for this function:

◆ lsm6_i2c_read()

void lsm6_i2c_read ( struct Lsm6_I2c lsm)

Definition at line 99 of file lsm6ds33_i2c.c.

References i2c_transaction::buf, Lsm6_I2c::i2c_p, i2c_submit(), Lsm6_I2c::i2c_trans, I2CTransDone, I2CTransTxRx, Lsm6_I2c::initialized, i2c_transaction::len_r, i2c_transaction::len_w, LSM6_REG_OUTX_L_G, i2c_transaction::status, and i2c_transaction::type.

Referenced by lsm6_i2c_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lsm6_i2c_start_configure()

void lsm6_i2c_start_configure ( struct Lsm6_I2c lsm)

Definition at line 88 of file lsm6ds33_i2c.c.

References Lsm6_I2c::i2c_trans, I2CTransDone, I2CTransSuccess, Lsm6_I2c::init_status, LSM6_CONF_UNINIT, lsm6_i2c_send_config(), and i2c_transaction::status.

Referenced by lsm6_i2c_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: