lsm6dsxx_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 OTA keys S.A.
3  * Copyright (C) 2024 HAW Hamburg.
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  *
9  */
10 
11 #pragma once
12 
25 #include "board.h"
26 #include "lsm6dsxx.h"
27 #include "saul_reg.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #ifndef LSM6DSXX_PARAM_I2C
38 #define LSM6DSXX_PARAM_I2C I2C_DEV(0)
39 #endif
40 #ifndef LSM6DSXX_PARAM_ADDR
41 #define LSM6DSXX_PARAM_ADDR (0x6B) /* (0x6A) */
42 #endif
43 #ifndef LSM6DSXX_PARAM_ACC_ODR
44 #define LSM6DSXX_PARAM_ACC_ODR (LSM6DSXX_DATA_RATE_52HZ)
45 #endif
46 #ifndef LSM6DSXX_PARAM_GYRO_ODR
47 #define LSM6DSXX_PARAM_GYRO_ODR (LSM6DSXX_DATA_RATE_52HZ)
48 #endif
49 #ifndef LSM6DSXX_PARAM_ACC_FS
50 #define LSM6DSXX_PARAM_ACC_FS (LSM6DSXX_ACC_FS_2G)
51 #endif
52 #ifndef LSM6DSXX_PARAM_GYRO_FS
53 #define LSM6DSXX_PARAM_GYRO_FS (LSM6DSXX_GYRO_FS_245DPS)
54 #endif
55 #ifndef LSM6DSXX_PARAM_ACC_FIFO_DEC
56 #define LSM6DSXX_PARAM_ACC_FIFO_DEC (LSM6DSXX_DECIMATION_NO)
57 #endif
58 #ifndef LSM6DSXX_PARAM_GYRO_FIFO_DEC
59 #define LSM6DSXX_PARAM_GYRO_FIFO_DEC (LSM6DSXX_DECIMATION_NO)
60 #endif
61 
62 #ifndef LSM6DSXX_PARAMS
63 #define LSM6DSXX_PARAMS { .i2c = LSM6DSXX_PARAM_I2C, \
64  .addr = LSM6DSXX_PARAM_ADDR, \
65  .acc_odr = LSM6DSXX_PARAM_ACC_ODR, \
66  .gyro_odr = LSM6DSXX_PARAM_GYRO_ODR, \
67  .acc_fs = LSM6DSXX_PARAM_ACC_FS, \
68  .gyro_fs = LSM6DSXX_PARAM_GYRO_FS, \
69  .acc_decimation = LSM6DSXX_PARAM_ACC_FIFO_DEC, \
70  .gyro_decimation = LSM6DSXX_PARAM_GYRO_FIFO_DEC }
71 #endif
72 #ifndef LSM6DSXX_SAUL_INFO
73 #define LSM6DSXX_SAUL_INFO { .name = "lsm6dsxx" }
74 #endif
81 {
82  LSM6DSXX_PARAMS
83 };
84 
89 {
90  LSM6DSXX_SAUL_INFO
91 };
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
Device driver interface for the LSM6DSXX 3D accelerometer/gyroscope.
static const lsm6dsxx_params_t lsm6dsxx_params[]
Allocate some memory to store the actual configuration.
static const saul_reg_info_t lsm6dsxx_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
LSM6DSXX driver parameters.
Definition: lsm6dsxx.h:92
Additional data to collect for each entry.
Definition: saul_reg.h:48