Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
 

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 data_g
union Lsm6_I2c.data_xl 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()

void lsm6_i2c_event ( struct Lsm6_I2c lsm)
extern

Definition at line 114 of file lsm6ds33_i2c.c.

References foo, I2CTransDone, I2CTransFailed, I2CTransSuccess, Int16FromBuf, LSM6_CONF_UNINIT, and lsm6_i2c_send_config().

+ Here is the call graph for this function:

◆ lsm6_i2c_init()

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

Definition at line 33 of file lsm6ds33_i2c.c.

References foo, I2CTransDone, LSM6_CONF_UNINIT, lsm6_set_default_config(), and i2c_periph::status.

+ Here is the call graph for this function:

◆ 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 foo, 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)
extern

Definition at line 99 of file lsm6ds33_i2c.c.

References foo, i2c_submit(), I2CTransDone, I2CTransTxRx, and LSM6_REG_OUTX_L_G.

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)
extern

Definition at line 88 of file lsm6ds33_i2c.c.

References foo, I2CTransDone, I2CTransSuccess, LSM6_CONF_UNINIT, and lsm6_i2c_send_config().

Referenced by lsm6_i2c_periodic().

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