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.c File Reference

Driver for LSM6DS33 accelerometer and gyrometer using I2C. More...

#include "peripherals/lsm6ds33_i2c.h"
#include "std.h"
#include <stdio.h>
+ Include dependency graph for lsm6ds33_i2c.c:

Go to the source code of this file.

Macros

#define Int16FromBuf(_buf, _idx)   ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
 

Functions

void lsm6_i2c_init (struct Lsm6_I2c *lsm, struct i2c_periph *i2c_p, uint8_t addr)
 
static void lsm6_i2c_tx_reg (struct Lsm6_I2c *lsm, uint8_t reg, uint8_t val)
 
static void lsm6_i2c_send_config (struct Lsm6_I2c *lsm)
 
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)
 

Detailed Description

Driver for LSM6DS33 accelerometer and gyrometer using I2C.

Definition in file lsm6ds33_i2c.c.

Macro Definition Documentation

◆ Int16FromBuf

#define Int16FromBuf (   _buf,
  _idx 
)    ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))

Definition at line 112 of file lsm6ds33_i2c.c.

Function Documentation

◆ lsm6_i2c_event()

void lsm6_i2c_event ( struct Lsm6_I2c lsm)

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 
)

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_read()

void lsm6_i2c_read ( struct Lsm6_I2c lsm)

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_send_config()

static void lsm6_i2c_send_config ( struct Lsm6_I2c lsm)
static

Definition at line 59 of file lsm6ds33_i2c.c.

References foo, I2CTransDone, LSM6_CONF_CTRL1_XL, LSM6_CONF_CTRL2_G, LSM6_CONF_CTRL3_C, LSM6_CONF_CTRL3_ORIENT, LSM6_CONF_DONE, lsm6_i2c_tx_reg(), LSM6_REG_CTRL1_XL, LSM6_REG_CTRL2_G, LSM6_REG_CTRL3_C, and LSM6_REG_ORIENT_CFG_G.

Referenced by lsm6_i2c_event(), and lsm6_i2c_start_configure().

+ 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 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:

◆ lsm6_i2c_tx_reg()

static void lsm6_i2c_tx_reg ( struct Lsm6_I2c lsm,
uint8_t  reg,
uint8_t  val 
)
static

Definition at line 48 of file lsm6ds33_i2c.c.

References foo, i2c_submit(), I2CTransTx, and val.

Referenced by lsm6_i2c_send_config().

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