Loading...
Searching...
No Matches
hih6130.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Eistec AB
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
9#pragma once
10
24
25#include <stdint.h>
26
27#include "periph/i2c.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
36typedef struct {
38 uint8_t addr;
39} hih6130_t;
40
48void hih6130_init(hih6130_t *dev, i2c_t i2c, uint8_t address);
49
62 int32_t *humidity_milli_percent, int32_t *temperature_milli_celsius);
63
64#ifdef __cplusplus
65}
66#endif
67
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:144
Low-level I2C peripheral driver interface definition.
Device descriptor for HIH6130/HIH6131 sensors.
Definition hih6130.h:36
uint8_t addr
the slave address of the sensor on the I2C bus
Definition hih6130.h:38
i2c_t i2c
I2C device the sensor is connected to.
Definition hih6130.h:37