Loading...
Searching...
No Matches

Default configuration for ST L3Gxxxx 3-axis gyroscope sensor family. More...

Detailed Description

Default configuration for ST L3Gxxxx 3-axis gyroscope sensor family.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file l3gxxxx_params.h.

#include "board.h"
#include "l3gxxxx.h"
#include "saul_reg.h"
+ Include dependency graph for l3gxxxx_params.h:

Go to the source code of this file.

Variables

static const l3gxxxx_params_t l3gxxxx_params []
 Allocate some memory to store the actual configuration.
 
static const saul_reg_info_t l3gxxxx_saul_info []
 Additional meta information to keep in the SAUL registry.
 

Default hardware configuration

#define L3GXXXX_I2C_DEV   (I2C_DEV(0))
 Default I2C device, if the I2C interface is used.
 
#define L3GXXXX_I2C_ADDR   (L3GXXXX_I2C_ADDR_2)
 Default I2C address, if the I2C interface is used.
 
#define L3GXXXX_I2C_IF_PARAMS
 Default I2C interface parameter set.
 
#define L3GXXXX_SPI_DEV   SPI_DEV(0)
 Default SPI device, if the SPI interface is used.
 
#define L3GXXXX_SPI_CLK   (SPI_CLK_1MHZ)
 Default SPI clock frequency, if the SPI interface is used.
 
#define L3GXXXX_SPI_CS   (GPIO_PIN(0, 0))
 Default SPI CS signal, if the SPI interface is used.
 
#define L3GXXXX_SPI_IF_PARAMS
 Default SPI interface parameter set.
 
#define L3GXXXX_INT1_PIN   (GPIO_PIN(0, 1))
 Default MCU pin for INT1 signal.
 
#define L3GXXXX_INT2_PIN   (GPIO_PIN(0, 2))
 Default MCU pin for INT2/DRDY signal.
 

Default sensor configuration

#define CONFIG_L3GXXXX_ODR   (L3GXXXX_ODR_100_25)
 Default ODR and cut-off frequency.
 
#define CONFIG_L3GXXXX_SCALE   (L3GXXXX_SCALE_245_DPS)
 Default full scale.
 
#define CONFIG_L3GXXXX_FILTER_SEL   (L3GXXXX_HPF_AND_LPF2)
 Default filter selection used for output data.
 
#define CONFIG_L3GXXXX_HPF_MODE   (L3GXXXX_HPF_NORMAL)
 Default HPF mode used for output data.
 
#define CONFIG_L3GXXXX_HPF_CUTOFF   (0)
 Default HPF cutoff frequency 8 Hz.
 
#define CONFIG_L3GXXXX_FIFO_MODE   (L3GXXXX_FIFO)
 Default FIFO mode if FIO is used.
 
#define CONFIG_L3GXXXX_FIFO_WATERMARK   (23)
 Default FIFO watermark level (threshold) value if FIO is used.
 
#define CONFIG_L3GXXXX_INT1_X_THRESH   (4012)
 Default INT1 threshold for X axis events (~30 dps at fulls scale of ±245 dps)
 
#define CONFIG_L3GXXXX_INT1_X_GT_THRESH   (true)
 Default INT1 interrupt enable for |X| > X threshold (X high event)
 
#define CONFIG_L3GXXXX_INT1_X_LT_THRESH   (false)
 Default INT1 interrupt enable for |X| < X threshold (X low event)
 
#define CONFIG_L3GXXXX_INT1_Y_THRESH   (4012)
 Default INT1 threshold for Y axis events (~30 dps at fulls scale of ±245 dps)
 
#define CONFIG_L3GXXXX_INT1_Y_GT_THRESH   (true)
 Default INT1 interrupt enable for |Y| < Y threshold (Y low event)
 
#define CONFIG_L3GXXXX_INT1_Y_LT_THRESH   (false)
 Default INT1 interrupt enable for |Y| > Y threshold (Y high event)
 
#define CONFIG_L3GXXXX_INT1_Z_THRESH   (4012)
 Default INT1 threshold for Z axis events (~30 dps at fulls scale of ±245 dps)
 
#define CONFIG_L3GXXXX_INT1_Z_GT_THRESH   (true)
 Default INT1 interrupt enable for |Z| < Z threshold (Z low event)
 
#define CONFIG_L3GXXXX_INT1_Z_LT_THRESH   (false)
 Default INT1 interrupt enable for |Z| > Z threshold (Z high event)
 
#define CONFIG_L3GXXXX_INT1_FILTER   (L3GXXXX_HPF_AND_LPF2)
 Default filter selection used for INT1 interrupt.
 
#define CONFIG_L3GXXXX_INT1_AND   (false)
 Default event interrupt combination is OR.
 
#define CONFIG_L3GXXXX_INT1_LATCH   (true)
 Default INT1 event interrupt latch enabled.
 
#define L3GXXXX_INT1_PARAMS
 Default INT1 parameter set.
 
#define L3GXXXX_INT2_PARAMS   .int2_pin = L3GXXXX_INT2_PIN,
 Default INT2 parameter set.
 
#define L3GXXXX_FIFO_PARAMS
 Default FIFO parameter set.
 
#define L3GXXXX_I2C_PARAMS
 Default I2C device parameter set.
 
#define L3GXXXX_SPI_PARAMS
 Default SPI device parameter set.
 
#define L3GXXXX_SAUL_INFO   { .name = "l3gxxxx" }
 Default SAUL device info.
 

Macro Definition Documentation

◆ CONFIG_L3GXXXX_FIFO_MODE

#define CONFIG_L3GXXXX_FIFO_MODE   (L3GXXXX_FIFO)

Default FIFO mode if FIO is used.

Definition at line 216 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_FIFO_WATERMARK

#define CONFIG_L3GXXXX_FIFO_WATERMARK   (23)

Default FIFO watermark level (threshold) value if FIO is used.

Definition at line 221 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_FILTER_SEL

#define CONFIG_L3GXXXX_FILTER_SEL   (L3GXXXX_HPF_AND_LPF2)

Default filter selection used for output data.

Definition at line 201 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_HPF_CUTOFF

#define CONFIG_L3GXXXX_HPF_CUTOFF   (0)

Default HPF cutoff frequency 8 Hz.

Definition at line 211 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_HPF_MODE

#define CONFIG_L3GXXXX_HPF_MODE   (L3GXXXX_HPF_NORMAL)

Default HPF mode used for output data.

Definition at line 206 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_AND

#define CONFIG_L3GXXXX_INT1_AND   (false)

Default event interrupt combination is OR.

Definition at line 276 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_FILTER

#define CONFIG_L3GXXXX_INT1_FILTER   (L3GXXXX_HPF_AND_LPF2)

Default filter selection used for INT1 interrupt.

Definition at line 271 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_LATCH

#define CONFIG_L3GXXXX_INT1_LATCH   (true)

Default INT1 event interrupt latch enabled.

Definition at line 281 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_X_GT_THRESH

#define CONFIG_L3GXXXX_INT1_X_GT_THRESH   (true)

Default INT1 interrupt enable for |X| > X threshold (X high event)

Definition at line 231 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_X_LT_THRESH

#define CONFIG_L3GXXXX_INT1_X_LT_THRESH   (false)

Default INT1 interrupt enable for |X| < X threshold (X low event)

Definition at line 236 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_X_THRESH

#define CONFIG_L3GXXXX_INT1_X_THRESH   (4012)

Default INT1 threshold for X axis events (~30 dps at fulls scale of ±245 dps)

Definition at line 226 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_Y_GT_THRESH

#define CONFIG_L3GXXXX_INT1_Y_GT_THRESH   (true)

Default INT1 interrupt enable for |Y| < Y threshold (Y low event)

Definition at line 246 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_Y_LT_THRESH

#define CONFIG_L3GXXXX_INT1_Y_LT_THRESH   (false)

Default INT1 interrupt enable for |Y| > Y threshold (Y high event)

Definition at line 251 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_Y_THRESH

#define CONFIG_L3GXXXX_INT1_Y_THRESH   (4012)

Default INT1 threshold for Y axis events (~30 dps at fulls scale of ±245 dps)

Definition at line 241 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_Z_GT_THRESH

#define CONFIG_L3GXXXX_INT1_Z_GT_THRESH   (true)

Default INT1 interrupt enable for |Z| < Z threshold (Z low event)

Definition at line 261 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_Z_LT_THRESH

#define CONFIG_L3GXXXX_INT1_Z_LT_THRESH   (false)

Default INT1 interrupt enable for |Z| > Z threshold (Z high event)

Definition at line 266 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_INT1_Z_THRESH

#define CONFIG_L3GXXXX_INT1_Z_THRESH   (4012)

Default INT1 threshold for Z axis events (~30 dps at fulls scale of ±245 dps)

Definition at line 256 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_ODR

#define CONFIG_L3GXXXX_ODR   (L3GXXXX_ODR_100_25)

Default ODR and cut-off frequency.

Definition at line 191 of file l3gxxxx_params.h.

◆ CONFIG_L3GXXXX_SCALE

#define CONFIG_L3GXXXX_SCALE   (L3GXXXX_SCALE_245_DPS)

Default full scale.

Definition at line 196 of file l3gxxxx_params.h.

◆ L3GXXXX_FIFO_PARAMS

#define L3GXXXX_FIFO_PARAMS
Value:
.fifo_mode = CONFIG_L3GXXXX_FIFO_MODE, \
.fifo_watermark = CONFIG_L3GXXXX_FIFO_WATERMARK,
#define CONFIG_L3GXXXX_FIFO_WATERMARK
Default FIFO watermark level (threshold) value if FIO is used.
#define CONFIG_L3GXXXX_FIFO_MODE
Default FIFO mode if FIO is used.

Default FIFO parameter set.

Definition at line 312 of file l3gxxxx_params.h.

◆ L3GXXXX_I2C_ADDR

#define L3GXXXX_I2C_ADDR   (L3GXXXX_I2C_ADDR_2)

Default I2C address, if the I2C interface is used.

Definition at line 41 of file l3gxxxx_params.h.

◆ L3GXXXX_I2C_DEV

#define L3GXXXX_I2C_DEV   (I2C_DEV(0))

Default I2C device, if the I2C interface is used.

Definition at line 36 of file l3gxxxx_params.h.

◆ L3GXXXX_I2C_IF_PARAMS

#define L3GXXXX_I2C_IF_PARAMS
Value:
.if_params.type = L3GXXXX_I2C, \
.if_params.i2c.dev = L3GXXXX_I2C_DEV, \
.if_params.i2c.addr = L3GXXXX_I2C_ADDR,
@ L3GXXXX_I2C
I2C interface used.
Definition l3gxxxx.h:1387
#define L3GXXXX_I2C_DEV
Default I2C device, if the I2C interface is used.
#define L3GXXXX_I2C_ADDR
Default I2C address, if the I2C interface is used.

Default I2C interface parameter set.

Definition at line 46 of file l3gxxxx_params.h.

◆ L3GXXXX_I2C_PARAMS

#define L3GXXXX_I2C_PARAMS
Value:
{ \
.filter_sel = CONFIG_L3GXXXX_FILTER_SEL, \
.hpf_mode = CONFIG_L3GXXXX_HPF_MODE, \
.hpf_cutoff = CONFIG_L3GXXXX_HPF_CUTOFF, \
L3GXXXX_FIFO_PARAMS \
L3GXXXX_INT1_PARAMS \
L3GXXXX_INT2_PARAMS \
}
#define CONFIG_L3GXXXX_FILTER_SEL
Default filter selection used for output data.
#define L3GXXXX_I2C_IF_PARAMS
Default I2C interface parameter set.
#define CONFIG_L3GXXXX_SCALE
Default full scale.
#define CONFIG_L3GXXXX_ODR
Default ODR and cut-off frequency.
#define CONFIG_L3GXXXX_HPF_CUTOFF
Default HPF cutoff frequency 8 Hz.
#define CONFIG_L3GXXXX_HPF_MODE
Default HPF mode used for output data.

Default I2C device parameter set.

Definition at line 322 of file l3gxxxx_params.h.

◆ L3GXXXX_INT1_PARAMS

#define L3GXXXX_INT1_PARAMS
Value:
.int1_pin = L3GXXXX_INT1_PIN, \
.int1_cfg.x_high_enabled = CONFIG_L3GXXXX_INT1_X_GT_THRESH, \
.int1_cfg.y_high_enabled = CONFIG_L3GXXXX_INT1_Y_GT_THRESH, \
.int1_cfg.z_high_enabled = CONFIG_L3GXXXX_INT1_Z_GT_THRESH, \
.int1_cfg.x_low_enabled = CONFIG_L3GXXXX_INT1_X_LT_THRESH, \
.int1_cfg.y_low_enabled = CONFIG_L3GXXXX_INT1_Y_LT_THRESH, \
.int1_cfg.z_low_enabled = CONFIG_L3GXXXX_INT1_Z_LT_THRESH, \
.int1_cfg.x_threshold = CONFIG_L3GXXXX_INT1_X_THRESH, \
.int1_cfg.y_threshold = CONFIG_L3GXXXX_INT1_Y_THRESH, \
.int1_cfg.z_threshold = CONFIG_L3GXXXX_INT1_Z_THRESH, \
.int1_cfg.filter = CONFIG_L3GXXXX_INT1_FILTER, \
.int1_cfg.and_or = CONFIG_L3GXXXX_INT1_AND, \
.int1_cfg.latch = CONFIG_L3GXXXX_INT1_LATCH,
#define CONFIG_L3GXXXX_INT1_AND
Default event interrupt combination is OR.
#define CONFIG_L3GXXXX_INT1_X_LT_THRESH
Default INT1 interrupt enable for |X| < X threshold (X low event)
#define CONFIG_L3GXXXX_INT1_Z_GT_THRESH
Default INT1 interrupt enable for |Z| < Z threshold (Z low event)
#define L3GXXXX_INT1_PIN
Default MCU pin for INT1 signal.
#define CONFIG_L3GXXXX_INT1_LATCH
Default INT1 event interrupt latch enabled.
#define CONFIG_L3GXXXX_INT1_FILTER
Default filter selection used for INT1 interrupt.
#define CONFIG_L3GXXXX_INT1_Z_LT_THRESH
Default INT1 interrupt enable for |Z| > Z threshold (Z high event)
#define CONFIG_L3GXXXX_INT1_Z_THRESH
Default INT1 threshold for Z axis events (~30 dps at fulls scale of ±245 dps)
#define CONFIG_L3GXXXX_INT1_Y_THRESH
Default INT1 threshold for Y axis events (~30 dps at fulls scale of ±245 dps)
#define CONFIG_L3GXXXX_INT1_Y_LT_THRESH
Default INT1 interrupt enable for |Y| > Y threshold (Y high event)
#define CONFIG_L3GXXXX_INT1_X_THRESH
Default INT1 threshold for X axis events (~30 dps at fulls scale of ±245 dps)
#define CONFIG_L3GXXXX_INT1_X_GT_THRESH
Default INT1 interrupt enable for |X| > X threshold (X high event)
#define CONFIG_L3GXXXX_INT1_Y_GT_THRESH
Default INT1 interrupt enable for |Y| < Y threshold (Y low event)

Default INT1 parameter set.

Definition at line 286 of file l3gxxxx_params.h.

◆ L3GXXXX_INT1_PIN

#define L3GXXXX_INT1_PIN   (GPIO_PIN(0, 1))

Default MCU pin for INT1 signal.

Definition at line 82 of file l3gxxxx_params.h.

◆ L3GXXXX_INT2_PARAMS

#define L3GXXXX_INT2_PARAMS   .int2_pin = L3GXXXX_INT2_PIN,

Default INT2 parameter set.

Definition at line 305 of file l3gxxxx_params.h.

◆ L3GXXXX_INT2_PIN

#define L3GXXXX_INT2_PIN   (GPIO_PIN(0, 2))

Default MCU pin for INT2/DRDY signal.

Definition at line 87 of file l3gxxxx_params.h.

◆ L3GXXXX_SAUL_INFO

#define L3GXXXX_SAUL_INFO   { .name = "l3gxxxx" }

Default SAUL device info.

Definition at line 355 of file l3gxxxx_params.h.

◆ L3GXXXX_SPI_CLK

#define L3GXXXX_SPI_CLK   (SPI_CLK_1MHZ)

Default SPI clock frequency, if the SPI interface is used.

Definition at line 62 of file l3gxxxx_params.h.

◆ L3GXXXX_SPI_CS

#define L3GXXXX_SPI_CS   (GPIO_PIN(0, 0))

Default SPI CS signal, if the SPI interface is used.

Definition at line 67 of file l3gxxxx_params.h.

◆ L3GXXXX_SPI_DEV

#define L3GXXXX_SPI_DEV   SPI_DEV(0)

Default SPI device, if the SPI interface is used.

Definition at line 57 of file l3gxxxx_params.h.

◆ L3GXXXX_SPI_IF_PARAMS

#define L3GXXXX_SPI_IF_PARAMS
Value:
.if_params.type = L3GXXXX_SPI, \
.if_params.spi.dev = L3GXXXX_SPI_DEV, \
.if_params.spi.clk = L3GXXXX_SPI_CLK, \
.if_params.spi.cs = L3GXXXX_SPI_CS,
@ L3GXXXX_SPI
SPI interface used.
Definition l3gxxxx.h:1390
#define L3GXXXX_SPI_DEV
Default SPI device, if the SPI interface is used.
#define L3GXXXX_SPI_CLK
Default SPI clock frequency, if the SPI interface is used.
#define L3GXXXX_SPI_CS
Default SPI CS signal, if the SPI interface is used.

Default SPI interface parameter set.

Definition at line 72 of file l3gxxxx_params.h.

◆ L3GXXXX_SPI_PARAMS

#define L3GXXXX_SPI_PARAMS
Value:
{ \
.filter_sel = CONFIG_L3GXXXX_FILTER_SEL, \
.hpf_mode = CONFIG_L3GXXXX_HPF_MODE, \
.hpf_cutoff = CONFIG_L3GXXXX_HPF_CUTOFF, \
L3GXXXX_FIFO_PARAMS \
L3GXXXX_INT1_PARAMS \
L3GXXXX_INT2_PARAMS \
}
#define L3GXXXX_SPI_IF_PARAMS
Default SPI interface parameter set.

Default SPI device parameter set.

Definition at line 339 of file l3gxxxx_params.h.

Variable Documentation

◆ l3gxxxx_params

const l3gxxxx_params_t l3gxxxx_params[]
static
Initial value:
=
{
}
#define L3GXXXX_I2C_PARAMS
Default I2C device parameter set.
#define L3GXXXX_SPI_PARAMS
Default SPI device parameter set.

Allocate some memory to store the actual configuration.

Definition at line 362 of file l3gxxxx_params.h.

◆ l3gxxxx_saul_info

const saul_reg_info_t l3gxxxx_saul_info[]
static
Initial value:
=
{
}
#define L3GXXXX_SAUL_INFO
Default SAUL device info.

Additional meta information to keep in the SAUL registry.

Definition at line 375 of file l3gxxxx_params.h.