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 
10 #pragma once
11 
23 #include "board.h"
24 #include "saul_reg.h"
25 #include "mpu9x50.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #ifndef MPU9X50_PARAM_I2C
36 #define MPU9X50_PARAM_I2C I2C_DEV(0)
37 #endif
38 #ifndef MPU9X50_PARAM_ADDR
39 #define MPU9X50_PARAM_ADDR (MPU9X50_HW_ADDR_HEX_68)
40 #endif
41 #ifndef MPU9X50_PARAM_COMP_ADDR
42 #define MPU9X50_PARAM_COMP_ADDR (MPU9X50_COMP_ADDR_HEX_0C)
43 #endif
44 #ifndef MPU9X50_PARAM_SAMPLE_RATE
45 #define MPU9X50_PARAM_SAMPLE_RATE (MPU9X50_DEFAULT_SAMPLE_RATE)
46 #endif
47 
48 #ifndef MPU9X50_PARAMS
49 #define MPU9X50_PARAMS { .i2c = MPU9X50_PARAM_I2C, \
50  .addr = MPU9X50_PARAM_ADDR, \
51  .comp_addr = MPU9X50_PARAM_COMP_ADDR, \
52  .sample_rate = MPU9X50_PARAM_SAMPLE_RATE }
53 #endif
54 #ifndef MPU9X50_SAUL_INFO
55 #define MPU9X50_SAUL_INFO { .name = "mpu9x50" }
56 #endif
63 {
64  MPU9X50_PARAMS
65 };
66 
71 {
72  MPU9X50_SAUL_INFO
73 };
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
Device driver interface for the MPU-9X50 (MPU9150 and MPU9250)
static const saul_reg_info_t mpu9x50_saul_info[]
Additional meta information to keep in the SAUL registry.
static const mpu9x50_params_t mpu9x50_params[]
MPU9X50 configuration.
SAUL registry interface definition.
Device initialization parameters.
Definition: mpu9x50.h:131
Additional data to collect for each entry.
Definition: saul_reg.h:48