Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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... | |
Driver for the accelerometer and gyrometer LSM6DS33.
Definition in file lsm6ds33_i2c.h.
struct Lsm6_I2c |
Definition at line 38 of file lsm6ds33_i2c.h.
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 |
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 |
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 |
void lsm6_i2c_event | ( | struct Lsm6_I2c * | lsm | ) |
Definition at line 114 of file lsm6ds33_i2c.c.
References i2c_transaction::buf, Lsm6_I2c::data_available, Lsm6_I2c::data_g, Lsm6_I2c::data_xl, Lsm6_I2c::i2c_trans, I2CTransDone, I2CTransFailed, I2CTransSuccess, Lsm6_I2c::init_status, Lsm6_I2c::initialized, Int16FromBuf, LSM6_CONF_UNINIT, lsm6_i2c_send_config(), and i2c_transaction::status.
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 Lsm6_I2c::config, Lsm6_I2c::data_available, Lsm6_I2c::i2c_p, Lsm6_I2c::i2c_trans, I2CTransDone, Lsm6_I2c::init_status, Lsm6_I2c::initialized, LSM6_CONF_UNINIT, lsm6_set_default_config(), i2c_transaction::slave_addr, and i2c_transaction::status.
|
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().
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().
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().