Loading...
Searching...
No Matches
qmc5883l_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Freie Universität Berlin
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 "saul_reg.h"
22#include "board.h"
23#include "qmc5883l.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef QMC5883L_PARAM_I2C
34#define QMC5883L_PARAM_I2C I2C_DEV(0)
35#endif
36#ifndef QMC5883L_PARAM_PIN_DRDY
37#define QMC5883L_PARAM_PIN_DRDY (GPIO_UNDEF)
38#endif
39#ifndef QMC5883L_PARAM_ODR
40#define QMC5883L_PARAM_ODR (QMC5883L_ODR_10HZ)
41#endif
42#ifndef QMC5883L_PARAM_RNG
43#define QMC5883L_PARAM_RNG (QMC5883L_RNG_2G)
44#endif
45#ifndef QMC5883L_PARAM_OSR
46#define QMC5883L_PARAM_OSR (QMC5883L_OSR_64)
47#endif
48
49#ifndef QMC5883L_PARAMS
50#define QMC5883L_PARAMS { .i2c = QMC5883L_PARAM_I2C, \
51 .pin_drdy = QMC5883L_PARAM_PIN_DRDY, \
52 .odr = QMC5883L_PARAM_ODR, \
53 .rng = QMC5883L_PARAM_RNG, \
54 .osr = QMC5883L_PARAM_OSR }
55#endif
56
57#ifndef QMC5883L_SAUL_INFO
58#define QMC5883L_SAUL_INFO { .name = "qmc5883l" }
59#endif
61
66{
67 QMC5883L_PARAMS
68};
69
74{
75 QMC5883L_SAUL_INFO
76};
77
78#ifdef __cplusplus
79}
80#endif
81
API definition for the QMC5883L device driver.
static const saul_reg_info_t qmc5883l_saul_info[]
Additional meta information to keep in the SAUL registry.
static const qmc5883l_params_t qmc5883l_params[]
QMC5883L configuration.
SAUL registry interface definition.
QMC5883L initialization parameters.
Definition qmc5883l.h:133
Additional data to collect for each entry.
Definition saul_reg.h:48