Loading...
Searching...
No Matches
lis3mdl_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "lis3mdl.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef LIS3MDL_PARAM_I2C
31#define LIS3MDL_PARAM_I2C (I2C_DEV(0))
32#endif
33#ifndef LIS3MDL_PARAM_ADDR
34#define LIS3MDL_PARAM_ADDR (0x1E)
35#endif
36#ifndef LIS3MDL_PARAM_XYMODE
37#define LIS3MDL_PARAM_XYMODE (LIS3MDL_XY_MODE_HIGH)
38#endif
39#ifndef LIS3MDL_PARAM_ZMODE
40#define LIS3MDL_PARAM_ZMODE (LIS3MDL_Z_MODE_HIGH)
41#endif
42#ifndef LIS3MDL_PARAM_ODR
43#define LIS3MDL_PARAM_ODR (LIS3MDL_ODR_10Hz)
44#endif
45#ifndef LIS3MDL_PARAM_SCALE
46#define LIS3MDL_PARAM_SCALE (4)
47#endif
48#ifndef LIS3MDL_PARAM_OPMODE
49#define LIS3MDL_PARAM_OPMODE (LIS3MDL_OP_CONT_CONV)
50#endif
51
52#ifndef LIS3MDL_PARAMS
53#define LIS3MDL_PARAMS { .i2c = LIS3MDL_PARAM_I2C, \
54 .addr = LIS3MDL_PARAM_ADDR, \
55 .xy_mode = LIS3MDL_PARAM_XYMODE, \
56 .z_mode = LIS3MDL_PARAM_ZMODE, \
57 .odr = LIS3MDL_PARAM_ODR, \
58 .scale = LIS3MDL_PARAM_SCALE, \
59 .op_mode = LIS3MDL_PARAM_OPMODE }
60#endif
61#ifndef LIS3MDL_SAUL_INFO
62#define LIS3MDL_SAUL_INFO { .name = "lis3mdl" }
63#endif
65
70{
71 LIS3MDL_PARAMS
72};
73
78{
79 LIS3MDL_SAUL_INFO
80};
81
82#ifdef __cplusplus
83}
84#endif
85
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:95
Additional data to collect for each entry.
Definition saul_reg.h:48