fxos8700_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 UC Berkeley
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 
19 #ifndef FXOS8700_PARAMS_H
20 #define FXOS8700_PARAMS_H
21 
22 #include "board.h"
23 #include "fxos8700.h"
24 #include "saul_reg.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
38 #ifndef FXOS8700_PARAM_I2C
39 #define FXOS8700_PARAM_I2C I2C_DEV(0)
40 #endif
41 #ifndef FXOS8700_PARAM_ADDR
42 #define FXOS8700_PARAM_ADDR 0x1E
43 #endif
44 #ifndef FXOS8700_PARAM_ACC_RANGE
45 #define FXOS8700_PARAM_ACC_RANGE FXOS8700_REG_XYZ_DATA_CFG_FS__8G
46 #endif
47 #ifndef FXOS8700_PARAM_RENEW_INTERVAL
48 #define FXOS8700_PARAM_RENEW_INTERVAL 1000000ul
49 #endif
50 
51 #ifndef FXOS8700_PARAMS
52 #define FXOS8700_PARAMS { .i2c = FXOS8700_PARAM_I2C, \
53  .addr = FXOS8700_PARAM_ADDR, \
54  .acc_range = FXOS8700_PARAM_ACC_RANGE, \
55  .renew_interval = FXOS8700_PARAM_RENEW_INTERVAL }
56 #endif
57 #ifndef FXOS8700_SAUL_INFO
58 #define FXOS8700_SAUL_INFO { .name = "fxos8700" }
59 #endif
60 
66 {
67  FXOS8700_PARAMS
68 };
69 
74 {
75  FXOS8700_SAUL_INFO
76 };
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* FXOS8700_PARAMS_H */
83 
fxos8700_params
static const fxos8700_params_t fxos8700_params[]
FXOS8700 configuration.
Definition: fxos8700_params.h:65
fxos8700.h
Interface definition for the FXOS8700 sensor driver.
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
fxos8700_saul_info
static const saul_reg_info_t fxos8700_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: fxos8700_params.h:73
saul_reg.h
SAUL registry interface definition.
fxos8700_params_t
Parameters needed for device initialization.
Definition: fxos8700.h:69