Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "mcu_periph/i2c.h"
#include "math/pprz_algebra_int.h"
#include "peripherals/lsm303dlhc.h"
Go to the source code of this file.
Data Structures | |
struct | Lsm303dlhc_i2c |
union | Lsm303dlhc_i2c.init_status |
union | Lsm303dlhc_i2c.data_accel |
union | Lsm303dlhc_i2c.config |
Functions | |
void | lsm303dlhc_i2c_init (struct Lsm303dlhc_i2c *lsm, struct i2c_periph *i2c_p, uint8_t addr) |
Initialize Lsm303dlhc struct and set default config options. More... | |
void | lsm303dlhc_i2c_start_configure (struct Lsm303dlhc_i2c *lsm) |
void | lsm303dlhc_i2c_read (struct Lsm303dlhc_i2c *lsm) |
void | lsm303dlhc_i2c_event (struct Lsm303dlhc_i2c *lsm) |
static void | lsm303dlhc_i2c_periodic (struct Lsm303dlhc_i2c *lsm) |
convenience function: read or start configuration if not already initialized More... | |
struct Lsm303dlhc_i2c |
Definition at line 41 of file lsm303dlhc_i2c.h.
Data Fields | ||
---|---|---|
union Lsm303dlhc_i2c | config | |
union Lsm303dlhc_i2c | data_accel | |
volatile bool | data_available | data ready flag |
struct i2c_periph * | i2c_p | |
struct i2c_transaction | i2c_trans | |
union Lsm303dlhc_i2c | init_status | |
bool | initialized | config done flag |
union Lsm303dlhc_i2c.init_status |
Definition at line 45 of file lsm303dlhc_i2c.h.
Data Fields | ||
---|---|---|
enum Lsm303dlhcAccConfStatus | acc | init status |
enum Lsm303dlhcMagConfStatus | mag | init status |
union Lsm303dlhc_i2c.data_accel |
Definition at line 50 of file lsm303dlhc_i2c.h.
Data Fields | ||
---|---|---|
int16_t | value[3] | data values accessible by channel index |
struct Int16Vect3 | vect | data vector in acc coordinate system |
union Lsm303dlhc_i2c.config |
Definition at line 54 of file lsm303dlhc_i2c.h.
Data Fields | ||
---|---|---|
struct Lsm303dlhcAccConfig | acc | |
struct Lsm303dlhcMagConfig | mag |
void lsm303dlhc_i2c_event | ( | struct Lsm303dlhc_i2c * | lsm | ) |
void lsm303dlhc_i2c_init | ( | struct Lsm303dlhc_i2c * | lsm, |
struct i2c_periph * | i2c_p, | ||
uint8_t | addr | ||
) |
Initialize Lsm303dlhc struct and set default config options.
lsm | Lsm303dlhc struct |
i2c_p | I2C peripheral to use |
addr | I2C address of Lsm303dlhc |
Definition at line 39 of file lsm303dlhc_i2c.c.
References Lsm303dlhc_i2c::config, Lsm303dlhc_i2c::i2c_p, Lsm303dlhc_i2c::i2c_trans, I2CTransDone, Lsm303dlhc_i2c::init_status, Lsm303dlhc_i2c::initialized, LSM303DLHC_ACC_ADDR, lsm303dlhc_acc_set_default_config(), lsm303dlhc_mag_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 69 of file lsm303dlhc_i2c.h.
References Lsm303dlhc_i2c::initialized, lsm303dlhc_i2c_read(), and lsm303dlhc_i2c_start_configure().
void lsm303dlhc_i2c_read | ( | struct Lsm303dlhc_i2c * | lsm | ) |
void lsm303dlhc_i2c_start_configure | ( | struct Lsm303dlhc_i2c * | lsm | ) |