Loading...
Searching...
No Matches
hih6130.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Eistec AB
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
21
22#include <stdint.h>
23
24#include "periph/i2c.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
33typedef struct {
35 uint8_t addr;
36} hih6130_t;
37
45void hih6130_init(hih6130_t *dev, i2c_t i2c, uint8_t address);
46
59 int32_t *humidity_milli_percent, int32_t *temperature_milli_celsius);
60
61#ifdef __cplusplus
62}
63#endif
64
void hih6130_init(hih6130_t *dev, i2c_t i2c, uint8_t address)
Initialize a sensor.
int hih6130_get_humidity_temperature(const hih6130_t *dev, int32_t *humidity_milli_percent, int32_t *temperature_milli_celsius)
Read humidity and temperature.
uint_fast8_t i2c_t
Default i2c_t type definition.
Definition i2c.h:155
Low-level I2C peripheral driver interface definition.
Device descriptor for HIH6130/HIH6131 sensors.
Definition hih6130.h:33
uint8_t addr
the slave address of the sensor on the I2C bus
Definition hih6130.h:35
i2c_t i2c
I2C device the sensor is connected to.
Definition hih6130.h:34