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
9#pragma once
10
20
21#include "board.h"
22#include "lis3mdl.h"
23#include "saul_reg.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef LIS3MDL_PARAM_I2C
34#define LIS3MDL_PARAM_I2C (I2C_DEV(0))
35#endif
36#ifndef LIS3MDL_PARAM_ADDR
37#define LIS3MDL_PARAM_ADDR (0x1E)
38#endif
39#ifndef LIS3MDL_PARAM_XYMODE
40#define LIS3MDL_PARAM_XYMODE (LIS3MDL_XY_MODE_HIGH)
41#endif
42#ifndef LIS3MDL_PARAM_ZMODE
43#define LIS3MDL_PARAM_ZMODE (LIS3MDL_Z_MODE_HIGH)
44#endif
45#ifndef LIS3MDL_PARAM_ODR
46#define LIS3MDL_PARAM_ODR (LIS3MDL_ODR_10Hz)
47#endif
48#ifndef LIS3MDL_PARAM_SCALE
49#define LIS3MDL_PARAM_SCALE (4)
50#endif
51#ifndef LIS3MDL_PARAM_OPMODE
52#define LIS3MDL_PARAM_OPMODE (LIS3MDL_OP_CONT_CONV)
53#endif
54
55#ifndef LIS3MDL_PARAMS
56#define LIS3MDL_PARAMS { .i2c = LIS3MDL_PARAM_I2C, \
57 .addr = LIS3MDL_PARAM_ADDR, \
58 .xy_mode = LIS3MDL_PARAM_XYMODE, \
59 .z_mode = LIS3MDL_PARAM_ZMODE, \
60 .odr = LIS3MDL_PARAM_ODR, \
61 .scale = LIS3MDL_PARAM_SCALE, \
62 .op_mode = LIS3MDL_PARAM_OPMODE }
63#endif
64#ifndef LIS3MDL_SAUL_INFO
65#define LIS3MDL_SAUL_INFO { .name = "lis3mdl" }
66#endif
68
73{
74 LIS3MDL_PARAMS
75};
76
81{
82 LIS3MDL_SAUL_INFO
83};
84
85#ifdef __cplusplus
86}
87#endif
88
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:98
Additional data to collect for each entry.
Definition saul_reg.h:48