Loading...
Searching...
No Matches
hts221_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "hts221.h"
20#include "hts221_regs.h"
21#include "saul_reg.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#ifndef HTS221_PARAM_I2C
32#define HTS221_PARAM_I2C I2C_DEV(0)
33#endif
34#ifndef HTS221_PARAM_ADDR
35#define HTS221_PARAM_ADDR (HTS221_I2C_ADDRESS)
36#endif
37#ifndef HTS221_PARAM_AVGX
38#define HTS221_PARAM_AVGX ((HTS221_REGS_AVGT_16 << HTS221_REGS_AVGT_SHIFT) | \
39 HTS221_REGS_AVGH_32)
40#endif
41#ifndef HTS221_PARAM_RATE
42#define HTS221_PARAM_RATE (HTS221_REGS_CTRL_REG1_ODR_12HZ)
43#endif
44#ifndef HTS221_PARAMS
45#define HTS221_PARAMS { .i2c = HTS221_PARAM_I2C, \
46 .addr = HTS221_PARAM_ADDR, \
47 .avgx = HTS221_PARAM_AVGX, \
48 .rate = HTS221_PARAM_RATE }
49#endif /* HTS221_PARAMS */
50
51#ifndef HTS221_SAULINFO
52#define HTS221_SAULINFO { .name = "hts221" }
53#endif
55
60{
61 HTS221_PARAMS,
62};
63
68{
69 HTS221_SAULINFO
70};
71
72#ifdef __cplusplus
73}
74#endif
75
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:43
Additional data to collect for each entry.
Definition saul_reg.h:48