Loading...
Searching...
No Matches
adxl345_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Mesotic SAS
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 "adxl345.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef ADXL345_PARAM_I2C
31#define ADXL345_PARAM_I2C (I2C_DEV(0))
32#endif
33#ifndef ADXL345_PARAM_ADDR
34#define ADXL345_PARAM_ADDR (ADXL345_ADDR_53)
35#endif
36#ifndef ADXL345_PARAM_RATE
37#define ADXL345_PARAM_RATE (ADXL345_RATE_200HZ)
38#endif
39#ifndef ADXL345_PARAM_RANGE
40#define ADXL345_PARAM_RANGE (ADXL345_RANGE_16G)
41#endif
42#ifndef ADXL345_PARAM_INTERRUPT
43#define ADXL345_PARAM_INTERRUPT {0x0F, 0xBF, 0x40, 0xF0, 0xFF, 0x00, 0x00, \
44 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F}
45#endif
46#ifndef ADXL345_PARAM_FULL_RES
47#define ADXL345_PARAM_FULL_RES (1)
48#endif
49#ifndef ADXL345_PARAM_OFFSET
50#define ADXL345_PARAM_OFFSET { 0, 0, 0 }
51#endif
52
53#ifndef ADXL345_PARAMS
54#define ADXL345_PARAMS { .i2c = ADXL345_PARAM_I2C, \
55 .addr = ADXL345_PARAM_ADDR, \
56 .offset = ADXL345_PARAM_OFFSET, \
57 .range = ADXL345_PARAM_RANGE, \
58 .rate = ADXL345_PARAM_RATE, \
59 .full_res = ADXL345_PARAM_FULL_RES }
60#endif
61#ifndef ADXL345_SAUL_INFO
62#define ADXL345_SAUL_INFO { .name = "adxl345" }
63#endif
65
70{
71 ADXL345_PARAMS
72};
73
78{
79 ADXL345_SAUL_INFO
80};
81
82#ifdef __cplusplus
83}
84#endif
85
Interface definition for the ADXL345.
static const adxl345_params_t adxl345_params[]
ADXL345 configuration.
static const saul_reg_info_t adxl345_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
Configuration struct for the ADXL345 sensor.
Definition adxl345.h:144
Additional data to collect for each entry.
Definition saul_reg.h:48