Loading...
Searching...
No Matches
lis3mdl_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Inria
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 LIS3MDL_PARAMS_H
20#define LIS3MDL_PARAMS_H
21
22#include "board.h"
23#include "lis3mdl.h"
24#include "saul_reg.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef LIS3MDL_PARAM_I2C
35#define LIS3MDL_PARAM_I2C (I2C_DEV(0))
36#endif
37#ifndef LIS3MDL_PARAM_ADDR
38#define LIS3MDL_PARAM_ADDR (0x1E)
39#endif
40#ifndef LIS3MDL_PARAM_XYMODE
41#define LIS3MDL_PARAM_XYMODE (LIS3MDL_XY_MODE_HIGH)
42#endif
43#ifndef LIS3MDL_PARAM_ZMODE
44#define LIS3MDL_PARAM_ZMODE (LIS3MDL_Z_MODE_HIGH)
45#endif
46#ifndef LIS3MDL_PARAM_ODR
47#define LIS3MDL_PARAM_ODR (LIS3MDL_ODR_10Hz)
48#endif
49#ifndef LIS3MDL_PARAM_SCALE
50#define LIS3MDL_PARAM_SCALE (4)
51#endif
52#ifndef LIS3MDL_PARAM_OPMODE
53#define LIS3MDL_PARAM_OPMODE (LIS3MDL_OP_CONT_CONV)
54#endif
55
56#ifndef LIS3MDL_PARAMS
57#define LIS3MDL_PARAMS { .i2c = LIS3MDL_PARAM_I2C, \
58 .addr = LIS3MDL_PARAM_ADDR, \
59 .xy_mode = LIS3MDL_PARAM_XYMODE, \
60 .z_mode = LIS3MDL_PARAM_ZMODE, \
61 .odr = LIS3MDL_PARAM_ODR, \
62 .scale = LIS3MDL_PARAM_SCALE, \
63 .op_mode = LIS3MDL_PARAM_OPMODE }
64#endif
65#ifndef LIS3MDL_SAUL_INFO
66#define LIS3MDL_SAUL_INFO { .name = "lis3mdl" }
67#endif
74{
75 LIS3MDL_PARAMS
76};
77
82{
83 LIS3MDL_SAUL_INFO
84};
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* LIS3MDL_PARAMS_H */
Device driver interface for the LIS3MDL 3-axis magnetometer.
static const lis3mdl_params_t lis3mdl_params[]
Allocate some memory to store the actual configuration.
static const saul_reg_info_t lis3mdl_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
Device initialization parameters.
Definition lis3mdl.h:99
Additional data to collect for each entry.
Definition saul_reg.h:49