Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for ST LSM303DLHC 3D accelerometer and magnetometer. More...
Go to the source code of this file.
Data Structures | |
struct | Lsm303dlhcAccConfig |
struct | Lsm303dlhcMagConfig |
Macros | |
#define | LSM303DLHC_DEFAULT_AODR (0x01 << 4) |
#define | LSM303DLHC_DEFAULT_AFS (0x04 <<3) |
#define | LSM303DLHC_DEFAULT_MODR (0x5 << 2) |
#define | LSM303DLHC_DEFAULT_MFS (0x0 << 5) |
#define | LSM303DLHC_DEFAULT_MD (0x00 << 0) |
Enumerations | |
enum | Lsm303dlhcConfStatus { LSM_CONF_UNINIT , LSM_CONF_WHO_AM_I , LSM_CONF_CTRL_REG1 , LSM_CONF_CTRL_REG2 , LSM_CONF_CTRL_REG3 , LSM_CONF_CTRL_REG4 , LSM_CONF_CTRL_REG5 , LSM_CONF_CTRL_REG6 , LSM_CONF_CTRL_REG7 , LSM_CONF_DONE } |
config status states More... | |
enum | Lsm303dlhcTarget { LSM_TARGET_ACC , LSM_TARGET_MAG } |
Functions | |
static void | lsm303dlhc_acc_set_default_config (struct Lsm303dlhcAccConfig *c) |
static void | lsm303dlhc_mag_set_default_config (struct Lsm303dlhcMagConfig *c) |
Driver for ST LSM303DLHC 3D accelerometer and magnetometer.
UNTESTED
Definition in file lsm303dlhc.h.
struct Lsm303dlhcAccConfig |
Definition at line 56 of file lsm303dlhc.h.
Data Fields | ||
---|---|---|
uint8_t | rate | Data Output Rate (Hz) |
uint8_t | scale | full scale selection (m/s²) |
struct Lsm303dlhcMagConfig |
Definition at line 61 of file lsm303dlhc.h.
Data Fields | ||
---|---|---|
uint8_t | mode | Measurement mode. |
uint8_t | rate | Data Output Rate Bits (Hz) |
uint8_t | scale | Full scale gain configuration (Gauss) |
#define LSM303DLHC_DEFAULT_AFS (0x04 <<3) |
Definition at line 41 of file lsm303dlhc.h.
#define LSM303DLHC_DEFAULT_AODR (0x01 << 4) |
Definition at line 37 of file lsm303dlhc.h.
#define LSM303DLHC_DEFAULT_MD (0x00 << 0) |
Definition at line 53 of file lsm303dlhc.h.
#define LSM303DLHC_DEFAULT_MFS (0x0 << 5) |
Definition at line 49 of file lsm303dlhc.h.
#define LSM303DLHC_DEFAULT_MODR (0x5 << 2) |
Definition at line 45 of file lsm303dlhc.h.
enum Lsm303dlhcConfStatus |
config status states
Enumerator | |
---|---|
LSM_CONF_UNINIT | |
LSM_CONF_WHO_AM_I | |
LSM_CONF_CTRL_REG1 | |
LSM_CONF_CTRL_REG2 | |
LSM_CONF_CTRL_REG3 | |
LSM_CONF_CTRL_REG4 | |
LSM_CONF_CTRL_REG5 | |
LSM_CONF_CTRL_REG6 | |
LSM_CONF_CTRL_REG7 | |
LSM_CONF_DONE |
Definition at line 68 of file lsm303dlhc.h.
enum Lsm303dlhcTarget |
Enumerator | |
---|---|
LSM_TARGET_ACC | |
LSM_TARGET_MAG |
Definition at line 81 of file lsm303dlhc.h.
|
inlinestatic |
Definition at line 86 of file lsm303dlhc.h.
References LSM303DLHC_DEFAULT_AFS, LSM303DLHC_DEFAULT_AODR, Lsm303dlhcAccConfig::rate, and Lsm303dlhcAccConfig::scale.
Referenced by lsm303dlhc_i2c_init().
|
inlinestatic |
Definition at line 92 of file lsm303dlhc.h.
References LSM303DLHC_DEFAULT_MD, LSM303DLHC_DEFAULT_MFS, LSM303DLHC_DEFAULT_MODR, Lsm303dlhcMagConfig::mode, Lsm303dlhcMagConfig::rate, and Lsm303dlhcMagConfig::scale.
Referenced by lsm303dlhc_i2c_init().