Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lsm6ds33.h File Reference

LSM6DS33 accelerometer and gyrometer driver I2C interface. More...

#include "std.h"
#include "peripherals/lsm6ds33_regs.h"
+ Include dependency graph for lsm6ds33.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Lsm6Config
 

Macros

#define LSM6_XL_DEFAULT_ODR   (LSM6_ODR_XL_1_6KHZ << 4)
 
#define LSM6_XL_DEFAULT_FS   (LSM6_FS_XL_16G << 2)
 
#define LSM6_G_DEFAULT_ODR   (LSM6_ODR_G_1_6KHZ << 4)
 
#define LSM6_G_DEFAULT_FS   (LSM6_FS_G_1000 << 2)
 
#define LSM6_C_DEFAULT   (0x04)
 
#define LSM6_ORIENT   (0x02)
 
#define GYRO_SENS_H
 
#define LSM6_GYRO_SENS_245   0.3127
 default gyro sensitivy from the datasheet sens = [(deg/s)/LSB] * pi/180 * 2^INT32_RATE_FRAC ex: LSM6 with 1000 deg/s has 0.035 (deg/s)/LSB sens = 0.035 * pi/180 * 4096 = 2.5021 More...
 
#define LSM6_GYRO_SENS_245_NUM   3127
 
#define LSM6_GYRO_SENS_245_DEN   1000
 
#define LSM6_GYRO_SENS_500   0.6255
 
#define LSM6_GYRO_SENS_500_NUM   6255
 
#define LSM6_GYRO_SENS_500_DEN   1000
 
#define LSM6_GYRO_SENS_1000   2.5021
 
#define LSM6_GYRO_SENS_1000_NUM   25021
 
#define LSM6_GYRO_SENS_1000_DEN   1000
 
#define LSM6_GYRO_SENS_2000   5.0042
 
#define LSM6_GYRO_SENS_2000_NUM   50042
 
#define LSM6_GYRO_SENS_2000_DEN   1000
 
#define ACCEL_SENS_H
 
#define LSM6_ACCEL_SENS_2G   0.613125
 
#define LSM6_ACCEL_SENS_2G_NUM   981
 
#define LSM6_ACCEL_SENS_2G_DEN   1600
 
#define LSM6_ACCEL_SENS_4G   1.22625
 
#define LSM6_ACCEL_SENS_4G_NUM   981
 
#define LSM6_ACCEL_SENS_4G_DEN   800
 
#define LSM6_ACCEL_SENS_8G   2.4525
 
#define LSM6_ACCEL_SENS_8G_NUM   981
 
#define LSM6_ACCEL_SENS_8G_DEN   400
 
#define LSM6_ACCEL_SENS_16G   4.905
 
#define LSM6_ACCEL_SENS_16G_NUM   981
 
#define LSM6_ACCEL_SENS_16G_DEN   200
 

Enumerations

enum  Lsm6ConfStatus {
  LSM6_CONF_UNINIT, LSM6_CONF_CTRL1_XL, LSM6_CONF_CTRL2_G, LSM6_CONF_CTRL3_C,
  LSM6_CONF_CTRL3_ORIENT, LSM6_CONF_DONE
}
 

Functions

static void lsm6_set_default_config (struct Lsm6Config *c)
 

Detailed Description

LSM6DS33 accelerometer and gyrometer driver I2C interface.

Definition in file lsm6ds33.h.


Data Structure Documentation

struct Lsm6Config

Definition at line 111 of file lsm6ds33.h.

Data Fields
uint8_t c
uint8_t g
uint8_t orient
uint8_t xl

Macro Definition Documentation

#define ACCEL_SENS_H

Definition at line 79 of file lsm6ds33.h.

#define GYRO_SENS_H

Definition at line 56 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_16G   4.905

Definition at line 90 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_16G_DEN   200

Definition at line 92 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_16G_NUM   981

Definition at line 91 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_2G   0.613125

Definition at line 81 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_2G_DEN   1600

Definition at line 83 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_2G_NUM   981

Definition at line 82 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_4G   1.22625

Definition at line 84 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_4G_DEN   800

Definition at line 86 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_4G_NUM   981

Definition at line 85 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_8G   2.4525

Definition at line 87 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_8G_DEN   400

Definition at line 89 of file lsm6ds33.h.

#define LSM6_ACCEL_SENS_8G_NUM   981

Definition at line 88 of file lsm6ds33.h.

#define LSM6_C_DEFAULT   (0x04)

Definition at line 48 of file lsm6ds33.h.

Referenced by lsm6_set_default_config().

#define LSM6_G_DEFAULT_FS   (LSM6_FS_G_1000 << 2)

Definition at line 44 of file lsm6ds33.h.

Referenced by lsm6_set_default_config().

#define LSM6_G_DEFAULT_ODR   (LSM6_ODR_G_1_6KHZ << 4)

Definition at line 40 of file lsm6ds33.h.

Referenced by lsm6_set_default_config().

#define LSM6_GYRO_SENS_1000   2.5021

Definition at line 69 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_1000_DEN   1000

Definition at line 71 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_1000_NUM   25021

Definition at line 70 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_2000   5.0042

Definition at line 72 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_2000_DEN   1000

Definition at line 74 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_2000_NUM   50042

Definition at line 73 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_245   0.3127

default gyro sensitivy from the datasheet sens = [(deg/s)/LSB] * pi/180 * 2^INT32_RATE_FRAC ex: LSM6 with 1000 deg/s has 0.035 (deg/s)/LSB sens = 0.035 * pi/180 * 4096 = 2.5021

Definition at line 63 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_245_DEN   1000

Definition at line 65 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_245_NUM   3127

Definition at line 64 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_500   0.6255

Definition at line 66 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_500_DEN   1000

Definition at line 68 of file lsm6ds33.h.

#define LSM6_GYRO_SENS_500_NUM   6255

Definition at line 67 of file lsm6ds33.h.

#define LSM6_ORIENT   (0x02)

Definition at line 52 of file lsm6ds33.h.

Referenced by lsm6_set_default_config().

#define LSM6_XL_DEFAULT_FS   (LSM6_FS_XL_16G << 2)

Definition at line 35 of file lsm6ds33.h.

Referenced by lsm6_set_default_config().

#define LSM6_XL_DEFAULT_ODR   (LSM6_ODR_XL_1_6KHZ << 4)

Definition at line 31 of file lsm6ds33.h.

Referenced by lsm6_set_default_config().

Enumeration Type Documentation

Enumerator
LSM6_CONF_UNINIT 
LSM6_CONF_CTRL1_XL 
LSM6_CONF_CTRL2_G 
LSM6_CONF_CTRL3_C 
LSM6_CONF_CTRL3_ORIENT 
LSM6_CONF_DONE 

Definition at line 102 of file lsm6ds33.h.

Function Documentation

static void lsm6_set_default_config ( struct Lsm6Config c)
inlinestatic

Definition at line 119 of file lsm6ds33.h.

References Lsm6Config::c, Lsm6Config::g, LSM6_C_DEFAULT, LSM6_G_DEFAULT_FS, LSM6_G_DEFAULT_ODR, LSM6_ORIENT, LSM6_XL_DEFAULT_FS, LSM6_XL_DEFAULT_ODR, Lsm6Config::orient, and Lsm6Config::xl.

Referenced by lsm6_i2c_init().

+ Here is the caller graph for this function: