Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lsm303dlhc.h File Reference

Driver for ST LSM303DLHC 3D accelerometer and magnetometer. More...

#include "std.h"
#include "mcu_periph/i2c.h"
#include "math/pprz_algebra_int.h"
#include "peripherals/lsm303dlhc_regs.h"
+ Include dependency graph for lsm303dlhc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Lsm303dlhcAccConfig
 
struct  Lsm303dlhcMagConfig
 
struct  Lsm303dlhc
 

Enumerations

enum  Lsm303dlhcAccConfStatus {
  LSM_CONF_ACC_UNINIT, LSM_CONF_ACC_CTRL_REG4_A, LSM_CONF_ACC_CTRL_REG1_A, LSM_CONF_ACC_CTRL_REG3_A,
  LSM_CONF_ACC_DONE
}
 config status states More...
 
enum  Lsm303dlhcMagConfStatus {
  LSM_CONF_MAG_UNINIT, LSM_CONF_MAG_CRA_REG_M, LSM_CONF_MAG_CRB_REG_M, LSM_CONF_MAG_MR_REG_M,
  LSM_CONF_MAG_DONE
}
 config status states More...
 

Functions

void lsm303dlhc_init (struct Lsm303dlhc *lsm, struct i2c_periph *i2c_p, uint8_t addr)
 Initialize Lsm303dlhc struct and set default config options. More...
 
void lsm303dlhc_start_configure (struct Lsm303dlhc *lsm)
 
void lsm303dlhc_read (struct Lsm303dlhc *lsm)
 
void lsm303dlhc_event (struct Lsm303dlhc *lsm)
 
static void lsm303dlhc_periodic (struct Lsm303dlhc *lsm)
 convenience function: read or start configuration if not already initialized More...
 

Detailed Description

Driver for ST LSM303DLHC 3D accelerometer and magnetometer.

Definition in file lsm303dlhc.h.

Enumeration Type Documentation

config status states

Enumerator
LSM_CONF_ACC_UNINIT 
LSM_CONF_ACC_CTRL_REG4_A 
LSM_CONF_ACC_CTRL_REG1_A 
LSM_CONF_ACC_CTRL_REG3_A 
LSM_CONF_ACC_DONE 

Definition at line 53 of file lsm303dlhc.h.

config status states

Enumerator
LSM_CONF_MAG_UNINIT 
LSM_CONF_MAG_CRA_REG_M 
LSM_CONF_MAG_CRB_REG_M 
LSM_CONF_MAG_MR_REG_M 
LSM_CONF_MAG_DONE 

Definition at line 62 of file lsm303dlhc.h.

Function Documentation

void lsm303dlhc_init ( struct Lsm303dlhc lsm,
struct i2c_periph i2c_p,
uint8_t  addr 
)
static void lsm303dlhc_periodic ( struct Lsm303dlhc lsm)
inlinestatic

convenience function: read or start configuration if not already initialized

Definition at line 100 of file lsm303dlhc.h.

References Lsm303dlhc::initialized, lsm303dlhc_read(), and lsm303dlhc_start_configure().

+ Here is the call graph for this function:

void lsm303dlhc_start_configure ( struct Lsm303dlhc lsm)