Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
l3gd20.h File Reference

ST L3GD20 3-axis gyroscope driver common interface (I2C and SPI). More...

+ Include dependency graph for l3gd20.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  L3gd20Config
 

Macros

#define L3GD20_SENS_2000_NUM   5004
 default gyro sensitivy and neutral from the datasheet L3GD20 has 70e-3 LSB/(deg/s) at 2000deg/s range sens = 70e-3 * pi/180 * 2^INT32_RATE_FRAC sens = (70e-3 / 180.0f) * pi * 4096 More...
 
#define L3GD20_SENS_2000_DEN   1000
 

Enumerations

enum  L3gd20ConfStatus {
  L3G_CONF_UNINIT = 0 , L3G_CONF_WHO_AM_I = 1 , L3G_CONF_WHO_AM_I_OK = 2 , L3G_CONF_REG4 = 3 ,
  L3G_CONF_ENABLE = 4 , L3G_CONF_DONE = 5
}
 

Functions

static void l3gd20_set_default_config (struct L3gd20Config *c)
 

Detailed Description

ST L3GD20 3-axis gyroscope driver common interface (I2C and SPI).

Definition in file l3gd20.h.


Data Structure Documentation

◆ L3gd20Config

struct L3gd20Config

Definition at line 52 of file l3gd20.h.

Data Fields
enum L3gd20DRBW drbw Data rate and bandwidth.
enum L3gd20FullScale full_scale gyro full scale
bool spi_3_wire Set 3-wire SPI mode, if FALSE: 4-wire SPI mode.

Macro Definition Documentation

◆ L3GD20_SENS_2000_DEN

#define L3GD20_SENS_2000_DEN   1000

Definition at line 41 of file l3gd20.h.

◆ L3GD20_SENS_2000_NUM

#define L3GD20_SENS_2000_NUM   5004

default gyro sensitivy and neutral from the datasheet L3GD20 has 70e-3 LSB/(deg/s) at 2000deg/s range sens = 70e-3 * pi/180 * 2^INT32_RATE_FRAC sens = (70e-3 / 180.0f) * pi * 4096

Definition at line 40 of file l3gd20.h.

Enumeration Type Documentation

◆ L3gd20ConfStatus

Enumerator
L3G_CONF_UNINIT 
L3G_CONF_WHO_AM_I 
L3G_CONF_WHO_AM_I_OK 
L3G_CONF_REG4 
L3G_CONF_ENABLE 
L3G_CONF_DONE 

Definition at line 43 of file l3gd20.h.

Function Documentation

◆ l3gd20_set_default_config()

static void l3gd20_set_default_config ( struct L3gd20Config c)
inlinestatic

Definition at line 59 of file l3gd20.h.

References L3gd20Config::drbw, L3gd20Config::full_scale, L3GD20_DRBW_760Hz_100BW, L3GD20_FS_2000dps2, and L3gd20Config::spi_3_wire.

Referenced by l3gd20_spi_init().

+ Here is the caller graph for this function: