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