mma7660_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 University of California, Berkeley
3  * Copyright (C) 2016 Michael Andersen <m.andersen@cs.berkeley.edu>
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 
22 #ifndef MMA7660_PARAMS_H
23 #define MMA7660_PARAMS_H
24 
25 #include "board.h"
26 #include "saul_reg.h"
27 #include "mma7660.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #ifndef MMA7660_PARAM_I2C
38 #define MMA7660_PARAM_I2C I2C_DEV(0)
39 #endif
40 #ifndef MMA7660_PARAM_ADDR
41 #define MMA7660_PARAM_ADDR (MMA7660_ADDR)
42 #endif
43 #ifndef MMA7660_PARAM_AMSR
44 #define MMA7660_PARAM_AMSR (MMA7660_SR_AM1)
45 #endif
46 #ifndef MMA7660_PARAM_AWSR
47 #define MMA7660_PARAM_AWSR (MMA7660_SR_AW1)
48 #endif
49 #ifndef MMA7660_PARAM_FILT
50 #define MMA7660_PARAM_FILT (1)
51 #endif
52 
53 #ifndef MMA7660_PARAMS
54 #define MMA7660_PARAMS { .i2c = MMA7660_PARAM_I2C, \
55  .addr = MMA7660_PARAM_ADDR, \
56  .amsr = MMA7660_PARAM_AMSR, \
57  .awsr = MMA7660_PARAM_AWSR, \
58  .filt = MMA7660_PARAM_FILT}
59 #endif
60 #ifndef MMA7660_SAUL_INFO
61 #define MMA7660_SAUL_INFO { .name = "mma7660" }
62 #endif
63 
69 {
70  MMA7660_PARAMS,
71 };
72 
77 {
78  MMA7660_SAUL_INFO
79 };
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* MMA7660_PARAMS_H */
86 
mma7660_saul_info
static const saul_reg_info_t mma7660_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: mma7660_params.h:76
mma7660.h
Interface definition for the MMA7660 accelerometer driver.
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
mma7660_params_t
Parameters for an MMA7660 device.
Definition: mma7660.h:49
saul_reg.h
SAUL registry interface definition.
mma7660_params
static const mma7660_params_t mma7660_params[]
MMA7660 configuration.
Definition: mma7660_params.h:68