Loading...
Searching...
No Matches
bmx055_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 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
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include "board.h"
26
31#ifndef BMX055_PARAM_I2C
32#define BMX055_PARAM_I2C I2C_DEV(0)
33#endif
34#ifndef BMX055_PARAM_MAG_ADDR
35#define BMX055_PARAM_MAG_ADDR CONFIG_BMX055_MAG_ADDR_DEFAULT
36#endif
37#ifndef BMX055_PARAM_ACC_ADDR
38#define BMX055_PARAM_ACC_ADDR CONFIG_BMX055_ACC_ADDR_DEFAULT
39#endif
40#ifndef BMX055_PARAM_GYRO_ADDR
41#define BMX055_PARAM_GYRO_ADDR CONFIG_BMX055_GYRO_ADDR_DEFAULT
42#endif
43#ifndef BMX055_PARAM_INT1
44#define BMX055_PARAM_INT1 GPIO_PIN(0, 0)
45#endif
46#ifndef BMX055_PARAM_INT2
47#define BMX055_PARAM_INT2 GPIO_PIN(0, 1)
48#endif
49#ifndef BMX055_PARAM_MAG_RATE
50#define BMX055_PARAM_MAG_RATE BMX055_MAG_DRATE_DEFAULT
51#endif
52#ifndef BMX055_PARAM_ACC_RANGE
53#define BMX055_PARAM_ACC_RANGE BMX055_ACC_RANGE_2G
54#endif
55#ifndef BMX055_PARAM_GYRO_SCALE
56#define BMX055_PARAM_GYRO_SCALE BMX055_GYRO_SCALE_2000DPS
57#endif
58
59#ifndef BMX055_PARAMS
60#define BMX055_PARAMS \
61 { .i2c = BMX055_PARAM_I2C, \
62 .addr_mag = BMX055_PARAM_MAG_ADDR, \
63 .addr_acc = BMX055_PARAM_ACC_ADDR, \
64 .addr_gyro = BMX055_PARAM_GYRO_ADDR, \
65 .int1_pin = BMX055_PARAM_INT1, \
66 .int2_pin = BMX055_PARAM_INT2, \
67 .mag_rate = BMX055_PARAM_MAG_RATE, \
68 .acc_range = BMX055_PARAM_ACC_RANGE, \
69 .gyro_scale = BMX055_PARAM_GYRO_SCALE, \
70 }
71#endif
72
73#ifndef BMX055_SAULINFO
74#define BMX055_SAULINFO \
75 { { .name = "Magnetometer (bmx055)" }, \
76 { .name = "Accelerometer (bmx055)" }, \
77 { .name = "Gyroscope (bmx055)" }, \
78 }
79#endif
81
86 BMX055_PARAMS
87};
88
92static const saul_reg_info_t bmx055_saul_info[][3] = {
93 BMX055_SAULINFO
94};
95
96#ifdef __cplusplus
97}
98#endif
99
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