Loading...
Searching...
No Matches
mma8x5x_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "saul_reg.h"
20#include "mma8x5x.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef MMA8X5X_PARAM_I2C
31#define MMA8X5X_PARAM_I2C (I2C_DEV(0))
32#endif
33#ifndef MMA8X5X_PARAM_ADDR
34#define MMA8X5X_PARAM_ADDR (CONFIG_MMA8X5X_I2C_ADDRESS)
35#endif
36#ifndef MMA8X5X_PARAM_RATE
37#define MMA8X5X_PARAM_RATE (MMA8X5X_RATE_200HZ)
38#endif
39#ifndef MMA8X5X_PARAM_RANGE
40#define MMA8X5X_PARAM_RANGE (MMA8X5X_RANGE_2G)
41#endif
42#ifndef MMA8X5X_PARAM_OFFSET
43#define MMA8X5X_PARAM_OFFSET { 0, 0, 0 }
44#endif
45
46#ifndef MMA8X5X_PARAMS
47#define MMA8X5X_PARAMS { .i2c = MMA8X5X_PARAM_I2C, \
48 .addr = MMA8X5X_PARAM_ADDR, \
49 .rate = MMA8X5X_PARAM_RATE, \
50 .range = MMA8X5X_PARAM_RANGE, \
51 .offset = MMA8X5X_PARAM_OFFSET }
52#endif
53#ifndef MMA8X5X_SAUL_INFO
54#define MMA8X5X_SAUL_INFO { .name = "mma8x5x" }
55#endif
57
62{
63 MMA8X5X_PARAMS
64};
65
70{
71 MMA8X5X_SAUL_INFO
72};
73
74#ifdef __cplusplus
75}
76#endif
77
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:103
Additional data to collect for each entry.
Definition saul_reg.h:48