Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
lsm6ds33_i2c.c File Reference
#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()

◆ lsm6_i2c_init()

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

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

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

◆ 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 i2c_transaction::buf, Lsm6_I2c::i2c_p, i2c_submit(), Lsm6_I2c::i2c_trans, I2CTransTx, i2c_transaction::len_r, i2c_transaction::len_w, i2c_transaction::type, and val.

Referenced by lsm6_i2c_send_config().

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