l3g4200d.h File Reference

Device driver interface for the L3G4200D gyroscope. More...

Detailed Description

The current state of the driver only implements a very basic polling mode.
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file l3g4200d.h.

#include <stdint.h>
#include "periph/i2c.h"
#include "periph/gpio.h"
+ Include dependency graph for l3g4200d.h:

Go to the source code of this file.

Data Structures

struct  l3g4200d_data_t
 Result vector for gyro measurement. More...
struct  l3g4200d_t
 Device descriptor for L3G4200D sensors. More...
struct  l3g4200d_params_t
 Data structure holding the device parameters needed for initialization. More...


#define L3G4200D_DEFAULT_ADDRESS   0x68
 The sensors default I2C address.


enum  l3g4200d_scale_t { L3G4200D_SCALE_250DPS = 0x0, L3G4200D_SCALE_500DPS = 0x1, L3G4200D_SCALE_2000DPS = 0x2 }
 Measurement scale for the gyro. More...
enum  l3g4200d_mode_t {
  L3G4200D_MODE_100_12 = 0x0, L3G4200D_MODE_100_25 = 0x1, L3G4200D_MODE_200_12 = 0x4, L3G4200D_MODE_200_25 = 0x5,
  L3G4200D_MODE_200_50 = 0x6, L3G4200D_MODE_200_70 = 0x7, L3G4200D_MODE_400_20 = 0x8, L3G4200D_MODE_400_25 = 0x9,
  L3G4200D_MODE_400_50 = 0xa, L3G4200D_MODE_400_110 = 0xb, L3G4200D_MODE_800_30 = 0xc, L3G4200D_MODE_800_35 = 0xd,
  L3G4200D_MODE_800_50 = 0xe, L3G4200D_MODE_800_110 = 0xf
 Sampling frequency and bandwidth settings for the gyro. More...


int l3g4200d_init (l3g4200d_t *dev, i2c_t i2c, uint8_t address, gpio_t int1_pin, gpio_t int2_pin, l3g4200d_mode_t mode, l3g4200d_scale_t scale)
 Initialize a gyro. More...
int l3g4200d_read (l3g4200d_t *dev, l3g4200d_data_t *acc_data)
 Read angular speed value in degree per second from gyro. More...
int l3g4200d_enable (l3g4200d_t *dev)
 Power-up the given device. More...
int l3g4200d_disable (l3g4200d_t *dev)
 Power-down the given device. More...