Loading...
Searching...
No Matches
lpsxxx_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Freie Universität Berlin
3 * 2018 Inria
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef LPSXXX_PARAMS_H
22#define LPSXXX_PARAMS_H
23
24#include "board.h"
25#include "lpsxxx.h"
26#include "saul_reg.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36#ifndef LPSXXX_PARAM_I2C
37#define LPSXXX_PARAM_I2C I2C_DEV(0)
38#endif
39#ifndef LPSXXX_PARAM_ADDR
40#define LPSXXX_PARAM_ADDR (CONFIG_LPSXXX_DEFAULT_ADDRESS)
41#endif
42#ifndef LPSXXX_PARAM_RATE
43#define LPSXXX_PARAM_RATE (LPSXXX_DEFAULT_RATE)
44#endif
45
46#ifndef LPSXXX_PARAMS
47#define LPSXXX_PARAMS { .i2c = LPSXXX_PARAM_I2C, \
48 .addr = LPSXXX_PARAM_ADDR, \
49 .rate = LPSXXX_PARAM_RATE }
50#endif
51
52#if MODULE_LPS331AP
53#define LPSXXX_SAUL_NAME "lps331ap"
54#elif MODULE_LPS25HB
55#define LPSXXX_SAUL_NAME "lps25hb"
56#elif MODULE_LPS22HB
57#define LPSXXX_SAUL_NAME "lps22hb"
58#elif MODULE_LPS22HH
59#define LPSXXX_SAUL_NAME "lps22hh"
60#elif MODULE_LPS22CH
61#define LPSXXX_SAUL_NAME "lps22ch"
62#endif
63#ifndef LPSXXX_SAUL_INFO
64#define LPSXXX_SAUL_INFO { .name = LPSXXX_SAUL_NAME }
65#endif
72{
73 LPSXXX_PARAMS
74};
75
80{
81 LPSXXX_SAUL_INFO
82};
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* LPSXXX_PARAMS_H */
static const saul_reg_info_t lpsxxx_saul_info[]
Additional meta information to keep in the SAUL registry.
static const lpsxxx_params_t lpsxxx_params[]
Allocate some memory to store the actual configuration.
SAUL registry interface definition.
Struct holding all parameters needed for device initialization.
Definition lpsxxx.h:106
Additional data to collect for each entry.
Definition saul_reg.h:49