lsm6dsl_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 OTA keys S.A.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  *
8  */
9 
21 #ifndef LSM6DSL_PARAMS_H
22 #define LSM6DSL_PARAMS_H
23 
24 #include "board.h"
25 #include "lsm6dsl.h"
26 #include "saul_reg.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #ifndef LSM6DSL_PARAM_I2C
37 #define LSM6DSL_PARAM_I2C I2C_DEV(0)
38 #endif
39 #ifndef LSM6DSL_PARAM_ADDR
40 #define LSM6DSL_PARAM_ADDR (0x6B) /* (0x6A) */
41 #endif
42 #ifndef LSM6DSL_PARAM_ACC_ODR
43 #define LSM6DSL_PARAM_ACC_ODR (LSM6DSL_DATA_RATE_52HZ)
44 #endif
45 #ifndef LSM6DSL_PARAM_GYRO_ODR
46 #define LSM6DSL_PARAM_GYRO_ODR (LSM6DSL_DATA_RATE_52HZ)
47 #endif
48 #ifndef LSM6DSL_PARAM_ACC_FS
49 #define LSM6DSL_PARAM_ACC_FS (LSM6DSL_ACC_FS_2G)
50 #endif
51 #ifndef LSM6DSL_PARAM_GYRO_FS
52 #define LSM6DSL_PARAM_GYRO_FS (LSM6DSL_GYRO_FS_245DPS)
53 #endif
54 #ifndef LSM6DSL_PARAM_ACC_FIFO_DEC
55 #define LSM6DSL_PARAM_ACC_FIFO_DEC (LSM6DSL_DECIMATION_NO)
56 #endif
57 #ifndef LSM6DSL_PARAM_GYRO_FIFO_DEC
58 #define LSM6DSL_PARAM_GYRO_FIFO_DEC (LSM6DSL_DECIMATION_NO)
59 #endif
60 
61 #ifndef LSM6DSL_PARAMS
62 #define LSM6DSL_PARAMS { .i2c = LSM6DSL_PARAM_I2C, \
63  .addr = LSM6DSL_PARAM_ADDR, \
64  .acc_odr = LSM6DSL_PARAM_ACC_ODR, \
65  .gyro_odr = LSM6DSL_PARAM_GYRO_ODR, \
66  .acc_fs = LSM6DSL_PARAM_ACC_FS, \
67  .gyro_fs = LSM6DSL_PARAM_GYRO_FS, \
68  .acc_decimation = LSM6DSL_PARAM_ACC_FIFO_DEC, \
69  .gyro_decimation = LSM6DSL_PARAM_GYRO_FIFO_DEC }
70 #endif
71 #ifndef LSM6DSL_SAUL_INFO
72 #define LSM6DSL_SAUL_INFO { .name = "lsm6dsl" }
73 #endif
74 
80 {
81  LSM6DSL_PARAMS
82 };
83 
88 {
89  LSM6DSL_SAUL_INFO
90 };
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* LSM6DSL_PARAMS_H */
97 
Device driver interface for the LSM6DSL 3D accelerometer/gyroscope.
static const saul_reg_info_t lsm6dsl_saul_info[]
Additional meta information to keep in the SAUL registry.
static const lsm6dsl_params_t lsm6dsl_params[]
Allocate some memory to store the actual configuration.
Additional data to collect for each entry.
Definition: saul_reg.h:49
SAUL registry interface definition.
LSM6DSL driver parameters.
Definition: lsm6dsl.h:93