Loading...
Searching...
No Matches
lis3dh_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
19#ifndef LIS3DH_PARAMS_H
20#define LIS3DH_PARAMS_H
21
22#include "board.h"
23#include "lis3dh.h"
24#include "saul_reg.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef LIS3DH_PARAM_SPI
35#define LIS3DH_PARAM_SPI (SPI_DEV(0))
36#endif
37#ifndef LIS3DH_PARAM_CS
38#define LIS3DH_PARAM_CS (GPIO_PIN(0, 0))
39#endif
40#ifndef LIS3DH_PARAM_CLK
41#define LIS3DH_PARAM_CLK (SPI_CLK_5MHZ)
42#endif
43#ifndef LIS3DH_PARAM_INT1
44#define LIS3DH_PARAM_INT1 (GPIO_PIN(0, 1))
45#endif
46#ifndef LIS3DH_PARAM_INT2
47#define LIS3DH_PARAM_INT2 (GPIO_PIN(0, 2))
48#endif
49#ifndef LIS3DH_PARAM_SCALE
50#define LIS3DH_PARAM_SCALE (4)
51#endif
52#ifndef LIS3DH_PARAM_ODR
53#define LIS3DH_PARAM_ODR (LIS3DH_ODR_100Hz)
54#endif
55
56#ifndef LIS3DH_PARAMS
57#define LIS3DH_PARAMS { .spi = LIS3DH_PARAM_SPI, \
58 .cs = LIS3DH_PARAM_CS, \
59 .clk = LIS3DH_PARAM_CLK, \
60 .int1 = LIS3DH_PARAM_INT1, \
61 .int2 = LIS3DH_PARAM_INT2, \
62 .scale = LIS3DH_PARAM_SCALE, \
63 .odr = LIS3DH_PARAM_ODR }
64#endif
65#ifndef LIS3DH_SAUL_INFO
66#define LIS3DH_SAUL_INFO { .name = "lis3dh" }
67#endif
74{
75 LIS3DH_PARAMS
76};
77
82{
83 LIS3DH_SAUL_INFO
84};
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* LIS3DH_PARAMS_H */
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:728
Additional data to collect for each entry.
Definition saul_reg.h:49