l3g4200d_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universität Berlin
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 L3G4200D_PARAMS_H
20 #define L3G4200D_PARAMS_H
21 
22 #include "board.h"
23 #include "l3g4200d.h"
24 #include "saul_reg.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #ifndef L3G4200D_PARAM_I2C
35 #define L3G4200D_PARAM_I2C I2C_DEV(0)
36 #endif
37 #ifndef L3G4200D_PARAM_ADDR
38 #define L3G4200D_PARAM_ADDR (CONFIG_L3G4200D_DEFAULT_ADDRESS)
39 #endif
40 #ifndef L3G4200D_PARAM_INT1
41 #define L3G4200D_PARAM_INT1 (GPIO_PIN(0, 0))
42 #endif
43 #ifndef L3G4200D_PARAM_INT2
44 #define L3G4200D_PARAM_INT2 (GPIO_PIN(0, 1))
45 #endif
46 #ifndef L3G4200D_PARAM_MODE
47 #define L3G4200D_PARAM_MODE (L3G4200D_MODE_200_25)
48 #endif
49 #ifndef L3G4200D_PARAM_SCALE
50 #define L3G4200D_PARAM_SCALE (L3G4200D_SCALE_500DPS)
51 #endif
52 
53 #ifndef L3G4200D_PARAMS
54 #define L3G4200D_PARAMS { .i2c = L3G4200D_PARAM_I2C, \
55  .addr = L3G4200D_PARAM_ADDR, \
56  .int1 = L3G4200D_PARAM_INT1, \
57  .int2 = L3G4200D_PARAM_INT2, \
58  .mode = L3G4200D_PARAM_MODE, \
59  .scale = L3G4200D_PARAM_SCALE }
60 #endif
61 #ifndef L3G4200D_SAUL_INFO
62 #define L3G4200D_SAUL_INFO { .name = "l3g4200d" }
63 #endif
64 
70 {
71  L3G4200D_PARAMS
72 };
73 
78 {
79  L3G4200D_SAUL_INFO
80 };
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* L3G4200D_PARAMS_H */
87 
l3g4200d_params_t
Device initialization parameters.
Definition: l3g4200d.h:98
l3g4200d.h
Device driver interface for the L3G4200D gyroscope.
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
l3g4200d_saul_info
static const saul_reg_info_t l3g4200d_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: l3g4200d_params.h:77
saul_reg.h
SAUL registry interface definition.
l3g4200d_params
static const l3g4200d_params_t l3g4200d_params[]
Allocate some memory to store the actual configuration.
Definition: l3g4200d_params.h:69