Loading...
Searching...
No Matches
lis3dh_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#include "board.h"
19#include "lis3dh.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef LIS3DH_PARAM_SPI
31#define LIS3DH_PARAM_SPI (SPI_DEV(0))
32#endif
33#ifndef LIS3DH_PARAM_CS
34#define LIS3DH_PARAM_CS (GPIO_PIN(0, 0))
35#endif
36#ifndef LIS3DH_PARAM_CLK
37#define LIS3DH_PARAM_CLK (SPI_CLK_5MHZ)
38#endif
39#ifndef LIS3DH_PARAM_INT1
40#define LIS3DH_PARAM_INT1 (GPIO_PIN(0, 1))
41#endif
42#ifndef LIS3DH_PARAM_INT2
43#define LIS3DH_PARAM_INT2 (GPIO_PIN(0, 2))
44#endif
45#ifndef LIS3DH_PARAM_SCALE
46#define LIS3DH_PARAM_SCALE (4)
47#endif
48#ifndef LIS3DH_PARAM_ODR
49#define LIS3DH_PARAM_ODR (LIS3DH_ODR_100Hz)
50#endif
51
52#ifndef LIS3DH_PARAMS
53#define LIS3DH_PARAMS { .spi = LIS3DH_PARAM_SPI, \
54 .cs = LIS3DH_PARAM_CS, \
55 .clk = LIS3DH_PARAM_CLK, \
56 .int1 = LIS3DH_PARAM_INT1, \
57 .int2 = LIS3DH_PARAM_INT2, \
58 .scale = LIS3DH_PARAM_SCALE, \
59 .odr = LIS3DH_PARAM_ODR }
60#endif
61#ifndef LIS3DH_SAUL_INFO
62#define LIS3DH_SAUL_INFO { .name = "lis3dh" }
63#endif
65
70{
71 LIS3DH_PARAMS
72};
73
78{
79 LIS3DH_SAUL_INFO
80};
81
82#ifdef __cplusplus
83}
84#endif
85
Device driver interface for the LIS3DH accelerometer.
static const saul_reg_info_t lis3dh_saul_info[]
Additional meta information to keep in the SAUL registry.
static const lis3dh_params_t lis3dh_params[]
Allocate some memory to store the actual configuration.
SAUL registry interface definition.
Configuration parameters for LIS3DH devices.
Definition lis3dh.h:724
Additional data to collect for each entry.
Definition saul_reg.h:48