Loading...
Searching...
No Matches
mag3110_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 HAW Hamburg
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 "saul_reg.h"
23#include "mag3110.h"
24#include "mag3110_reg.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef MAG3110_PARAM_I2C
35#define MAG3110_PARAM_I2C (I2C_DEV(0))
36#endif
37#ifndef MAG3110_PARAM_ADDR
38#define MAG3110_PARAM_ADDR (CONFIG_MAG3110_I2C_ADDRESS)
39#endif
40#ifndef MAG3110_PARAM_OFFSET
41#define MAG3110_PARAM_OFFSET { 0, 0, 0 }
42#endif
43#ifndef MAG3110_PARAMS
44#define MAG3110_PARAMS { .i2c = MAG3110_PARAM_I2C, \
45 .addr = MAG3110_PARAM_ADDR, \
46 .type = MAG3110_ID, \
47 .dros = MAG3110_DROS_DEFAULT, \
48 .offset = MAG3110_PARAM_OFFSET }
49#endif
50#ifndef MAG3110_SAUL_INFO
51#define MAG3110_SAUL_INFO { .name = "mag3110" }
52#endif
54
59{
60 MAG3110_PARAMS
61};
62
67{
68 MAG3110_SAUL_INFO
69};
70
71#ifdef __cplusplus
72}
73#endif
74
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:114
Additional data to collect for each entry.
Definition saul_reg.h:48