41 #define L3G4200_DEFAULT_DR L3G4200_DR_100Hz
43 #define L3G4200_DEFAULT_DLPF L3G4200_DLPF_1
45 #define L3G4200_DEFAULT_SCALE L3G4200_SCALE_2000
48 #define L3G4200_DEFAULT_CTRL_REG1 ((L3G4200_DEFAULT_DR<<6) | (L3G4200_DEFAULT_DLPF<<4) | 0xf);
49 #define L3G4200_DEFAULT_CTRL_REG4 (L3G4200_DEFAULT_SCALE<<4) | 0x00; // 2000deg = 0x30
50 #define L3G4200_DEFAULT_CTRL_REG5 0x00 // first low pass filter enable
void l3g4200_event(struct L3g4200 *l3g)
void l3g4200_init(struct L3g4200 *l3g, struct i2c_periph *i2c_p, uint8_t i2c_address)
Initialize L3g4200 struct and set default config options.
void l3g4200_start_configure(struct L3g4200 *l3g)
struct L3g4200Config config
static void l3g4200_periodic(struct L3g4200 *l3g)
convenience function: read or start configuration if not already initialized
void l3g4200_read(struct L3g4200 *l3g)
bool initialized
config done flag
enum L3g4200ConfStatus init_status
init status
Register defs for L3G4200 gyros.
void l3g4200_set_default_config(struct L3g4200Config *conf)
I2C transaction structure.
L3g4200ConfStatus
config status states
I2C peripheral structure.
struct i2c_transaction i2c_trans
struct i2c_periph * i2c_p
volatile bool data_available
data ready flag
Paparazzi fixed point algebra.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.