Loading...
Searching...
No Matches
hts221_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
19#ifndef HTS221_PARAMS_H
20#define HTS221_PARAMS_H
21
22#include "board.h"
23#include "hts221.h"
24#include "hts221_regs.h"
25#include "saul_reg.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35#ifndef HTS221_PARAM_I2C
36#define HTS221_PARAM_I2C I2C_DEV(0)
37#endif
38#ifndef HTS221_PARAM_ADDR
39#define HTS221_PARAM_ADDR (HTS221_I2C_ADDRESS)
40#endif
41#ifndef HTS221_PARAM_AVGX
42#define HTS221_PARAM_AVGX ((HTS221_REGS_AVGT_16 << HTS221_REGS_AVGT_SHIFT) | \
43 HTS221_REGS_AVGH_32)
44#endif
45#ifndef HTS221_PARAM_RATE
46#define HTS221_PARAM_RATE (HTS221_REGS_CTRL_REG1_ODR_12HZ)
47#endif
48#ifndef HTS221_PARAMS
49#define HTS221_PARAMS { .i2c = HTS221_PARAM_I2C, \
50 .addr = HTS221_PARAM_ADDR, \
51 .avgx = HTS221_PARAM_AVGX, \
52 .rate = HTS221_PARAM_RATE }
53#endif /* HTS221_PARAMS */
54
55#ifndef HTS221_SAULINFO
56#define HTS221_SAULINFO { .name = "hts221" }
57#endif
64{
65 HTS221_PARAMS,
66};
67
72{
73 HTS221_SAULINFO
74};
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* HTS221_PARAMS_H */
Interface definition for the ST HTS221 driver.
static const hts221_params_t hts221_params[]
HTS221 configuration.
static const saul_reg_info_t hts221_saul_info[]
Additional meta information to keep in the SAUL registry.
Register definitions for ST HTS221 devices.
SAUL registry interface definition.
Parameters needed for device initialization.
Definition hts221.h:44
Additional data to collect for each entry.
Definition saul_reg.h:49