mma8x5x_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 
9 #pragma once
10 
21 #include "board.h"
22 #include "saul_reg.h"
23 #include "mma8x5x.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef MMA8X5X_PARAM_I2C
34 #define MMA8X5X_PARAM_I2C (I2C_DEV(0))
35 #endif
36 #ifndef MMA8X5X_PARAM_ADDR
37 #define MMA8X5X_PARAM_ADDR (CONFIG_MMA8X5X_I2C_ADDRESS)
38 #endif
39 #ifndef MMA8X5X_PARAM_RATE
40 #define MMA8X5X_PARAM_RATE (MMA8X5X_RATE_200HZ)
41 #endif
42 #ifndef MMA8X5X_PARAM_RANGE
43 #define MMA8X5X_PARAM_RANGE (MMA8X5X_RANGE_2G)
44 #endif
45 #ifndef MMA8X5X_PARAM_OFFSET
46 #define MMA8X5X_PARAM_OFFSET { 0, 0, 0 }
47 #endif
48 
49 #ifndef MMA8X5X_PARAMS
50 #define MMA8X5X_PARAMS { .i2c = MMA8X5X_PARAM_I2C, \
51  .addr = MMA8X5X_PARAM_ADDR, \
52  .rate = MMA8X5X_PARAM_RATE, \
53  .range = MMA8X5X_PARAM_RANGE, \
54  .offset = MMA8X5X_PARAM_OFFSET }
55 #endif
56 #ifndef MMA8X5X_SAUL_INFO
57 #define MMA8X5X_SAUL_INFO { .name = "mma8x5x" }
58 #endif
65 {
66  MMA8X5X_PARAMS
67 };
68 
73 {
74  MMA8X5X_SAUL_INFO
75 };
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
Interface definition for the MMA8x5x accelerometer driver.
static const mma8x5x_params_t mma8x5x_params[]
MMA8x5x configuration.
static const saul_reg_info_t mma8x5x_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
Configuration parameters.
Definition: mma8x5x.h:106
Additional data to collect for each entry.
Definition: saul_reg.h:48