Loading...
Searching...
No Matches
bmx055_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include "board.h"
23
28#ifndef BMX055_PARAM_I2C
29#define BMX055_PARAM_I2C I2C_DEV(0)
30#endif
31#ifndef BMX055_PARAM_MAG_ADDR
32#define BMX055_PARAM_MAG_ADDR CONFIG_BMX055_MAG_ADDR_DEFAULT
33#endif
34#ifndef BMX055_PARAM_ACC_ADDR
35#define BMX055_PARAM_ACC_ADDR CONFIG_BMX055_ACC_ADDR_DEFAULT
36#endif
37#ifndef BMX055_PARAM_GYRO_ADDR
38#define BMX055_PARAM_GYRO_ADDR CONFIG_BMX055_GYRO_ADDR_DEFAULT
39#endif
40#ifndef BMX055_PARAM_INT1
41#define BMX055_PARAM_INT1 GPIO_PIN(0, 0)
42#endif
43#ifndef BMX055_PARAM_INT2
44#define BMX055_PARAM_INT2 GPIO_PIN(0, 1)
45#endif
46#ifndef BMX055_PARAM_MAG_RATE
47#define BMX055_PARAM_MAG_RATE BMX055_MAG_DRATE_DEFAULT
48#endif
49#ifndef BMX055_PARAM_ACC_RANGE
50#define BMX055_PARAM_ACC_RANGE BMX055_ACC_RANGE_2G
51#endif
52#ifndef BMX055_PARAM_GYRO_SCALE
53#define BMX055_PARAM_GYRO_SCALE BMX055_GYRO_SCALE_2000DPS
54#endif
55
56#ifndef BMX055_PARAMS
57#define BMX055_PARAMS \
58 { .i2c = BMX055_PARAM_I2C, \
59 .addr_mag = BMX055_PARAM_MAG_ADDR, \
60 .addr_acc = BMX055_PARAM_ACC_ADDR, \
61 .addr_gyro = BMX055_PARAM_GYRO_ADDR, \
62 .int1_pin = BMX055_PARAM_INT1, \
63 .int2_pin = BMX055_PARAM_INT2, \
64 .mag_rate = BMX055_PARAM_MAG_RATE, \
65 .acc_range = BMX055_PARAM_ACC_RANGE, \
66 .gyro_scale = BMX055_PARAM_GYRO_SCALE, \
67 }
68#endif
69
70#ifndef BMX055_SAULINFO
71#define BMX055_SAULINFO \
72 { { .name = "Magnetometer (bmx055)" }, \
73 { .name = "Accelerometer (bmx055)" }, \
74 { .name = "Gyroscope (bmx055)" }, \
75 }
76#endif
78
83 BMX055_PARAMS
84};
85
89static const saul_reg_info_t bmx055_saul_info[][3] = {
90 BMX055_SAULINFO
91};
92
93#ifdef __cplusplus
94}
95#endif
96
static const bmx055_params_t bmx055_params[]
BMX055 configuration.
static const saul_reg_info_t bmx055_saul_info[][3]
SAUL registry entries.
Data structure holding the device parameters needed for initialization.
Definition bmx055.h:126
Additional data to collect for each entry.
Definition saul_reg.h:48