Go to the documentation of this file.
19 #ifndef LIS2DH12_PARAMS_H
20 #define LIS2DH12_PARAMS_H
34 #ifdef MODULE_LIS2DH12_SPI
35 #ifndef LIS2DH12_PARAM_SPI
36 #define LIS2DH12_PARAM_SPI SPI_DEV(0)
38 #ifndef LIS2DH12_PARAM_CS
39 #define LIS2DH12_PARAM_CS GPIO_PIN(0, 0)
41 #define LIS2DH12_PARAMS_BUSCFG .spi = LIS2DH12_PARAM_SPI, \
42 .cs = LIS2DH12_PARAM_CS
45 #ifndef LIS2DH12_PARAM_I2C
46 #define LIS2DH12_PARAM_I2C I2C_DEV(0)
48 #ifndef LIS2DH12_PARAM_ADDR
49 #define LIS2DH12_PARAM_ADDR LIS2DH12_ADDR_DEFAULT
51 #define LIS2DH12_PARAMS_BUSCFG .i2c = LIS2DH12_PARAM_I2C, \
52 .addr = LIS2DH12_PARAM_ADDR
56 #ifndef LIS2DH12_PARAM_INT_PIN1
57 #define LIS2DH12_PARAM_INT_PIN1 GPIO_UNDEF
60 #ifndef LIS2DH12_PARAM_INT_PIN2
61 #define LIS2DH12_PARAM_INT_PIN2 GPIO_UNDEF
64 #ifndef LIS2DH12_PARAM_SCALE
65 #define LIS2DH12_PARAM_SCALE LIS2DH12_SCALE_2G
67 #ifndef LIS2DH12_PARAM_RATE
68 #define LIS2DH12_PARAM_RATE LIS2DH12_RATE_100HZ
71 #ifndef LIS2DH12_PARAMS
72 #ifdef MODULE_LIS2DH12_INT
73 #define LIS2DH12_PARAMS { \
74 LIS2DH12_PARAMS_BUSCFG, \
75 .int1_pin = LIS2DH12_PARAM_INT_PIN1, \
76 .int2_pin = LIS2DH12_PARAM_INT_PIN2, \
77 .scale = LIS2DH12_PARAM_SCALE, \
78 .rate = LIS2DH12_PARAM_RATE, \
81 #define LIS2DH12_PARAMS { \
82 LIS2DH12_PARAMS_BUSCFG, \
83 .scale = LIS2DH12_PARAM_SCALE, \
84 .rate = LIS2DH12_PARAM_RATE, \
89 #ifndef LIS2DH12_SAULINFO
90 #define LIS2DH12_SAULINFO { .name = "lis2dh12" }
LIS2DH12 configuration parameters.
Additional data to collect for each entry.
Interface definition for the STM LIS2DH12 accelerometer.
static const saul_reg_info_t lis2dh12_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
static const lis2dh12_params_t lis2dh12_params[]
LIS2DH12 configuration.