Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for LSM6DS33 accelerometer and gyrometer using I2C. More...
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) |
Driver for LSM6DS33 accelerometer and gyrometer using I2C.
Definition in file lsm6ds33_i2c.c.
#define Int16FromBuf | ( | _buf, | |
_idx | |||
) | ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx])) |
Definition at line 112 of file lsm6ds33_i2c.c.
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.
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().
|
static |
Definition at line 59 of file lsm6ds33_i2c.c.
References Lsm6Config::c, Lsm6_I2c::config, Lsm6Config::g, Lsm6_I2c::i2c_trans, I2CTransDone, Lsm6_I2c::init_status, Lsm6_I2c::initialized, 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, LSM6_REG_ORIENT_CFG_G, Lsm6Config::orient, i2c_transaction::status, and Lsm6Config::xl.
Referenced by lsm6_i2c_event(), and 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().
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().