mpu9x50_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  * 2019 HAW Hamburg
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 
21 #ifndef MPU9X50_PARAMS_H
22 #define MPU9X50_PARAMS_H
23 
24 #include "board.h"
25 #include "saul_reg.h"
26 #include "mpu9x50.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #ifndef MPU9X50_PARAM_I2C
37 #define MPU9X50_PARAM_I2C I2C_DEV(0)
38 #endif
39 #ifndef MPU9X50_PARAM_ADDR
40 #define MPU9X50_PARAM_ADDR (MPU9X50_HW_ADDR_HEX_68)
41 #endif
42 #ifndef MPU9X50_PARAM_COMP_ADDR
43 #define MPU9X50_PARAM_COMP_ADDR (MPU9X50_COMP_ADDR_HEX_0C)
44 #endif
45 #ifndef MPU9X50_PARAM_SAMPLE_RATE
46 #define MPU9X50_PARAM_SAMPLE_RATE (MPU9X50_DEFAULT_SAMPLE_RATE)
47 #endif
48 
49 #ifndef MPU9X50_PARAMS
50 #define MPU9X50_PARAMS { .i2c = MPU9X50_PARAM_I2C, \
51  .addr = MPU9X50_PARAM_ADDR, \
52  .comp_addr = MPU9X50_PARAM_COMP_ADDR, \
53  .sample_rate = MPU9X50_PARAM_SAMPLE_RATE }
54 #endif
55 #ifndef MPU9X50_SAUL_INFO
56 #define MPU9X50_SAUL_INFO { .name = "mpu9x50" }
57 #endif
58 
64 {
65  MPU9X50_PARAMS
66 };
67 
72 {
73  MPU9X50_SAUL_INFO
74 };
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* MPU9X50_PARAMS_H */
81 
Device initialization parameters.
Definition: mpu9x50.h:132
Additional data to collect for each entry.
Definition: saul_reg.h:49
SAUL registry interface definition.
static const saul_reg_info_t mpu9x50_saul_info[]
Additional meta information to keep in the SAUL registry.
Device driver interface for the MPU-9X50 (MPU9150 and MPU9250)
static const mpu9x50_params_t mpu9x50_params[]
MPU9X50 configuration.