Loading...
Searching...
No Matches
mag3110_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "saul_reg.h"
20#include "mag3110.h"
21#include "mag3110_reg.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#ifndef MAG3110_PARAM_I2C
32#define MAG3110_PARAM_I2C (I2C_DEV(0))
33#endif
34#ifndef MAG3110_PARAM_ADDR
35#define MAG3110_PARAM_ADDR (CONFIG_MAG3110_I2C_ADDRESS)
36#endif
37#ifndef MAG3110_PARAM_OFFSET
38#define MAG3110_PARAM_OFFSET { 0, 0, 0 }
39#endif
40#ifndef MAG3110_PARAMS
41#define MAG3110_PARAMS { .i2c = MAG3110_PARAM_I2C, \
42 .addr = MAG3110_PARAM_ADDR, \
43 .type = MAG3110_ID, \
44 .dros = MAG3110_DROS_DEFAULT, \
45 .offset = MAG3110_PARAM_OFFSET }
46#endif
47#ifndef MAG3110_SAUL_INFO
48#define MAG3110_SAUL_INFO { .name = "mag3110" }
49#endif
51
56{
57 MAG3110_PARAMS
58};
59
64{
65 MAG3110_SAUL_INFO
66};
67
68#ifdef __cplusplus
69}
70#endif
71
Interface definition for the MAG3110 magnetometer driver.
static const mag3110_params_t mag3110_params[]
MAG3110 configuration.
static const saul_reg_info_t mag3110_saul_info[]
Additional meta information to keep in the SAUL registry.
Register definition for the MAG3110 magnetometer driver.
SAUL registry interface definition.
Configuration parameters.
Definition mag3110.h:111
Additional data to collect for each entry.
Definition saul_reg.h:48