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
23#ifndef HIH6130_H
24#define HIH6130_H
25
26#include <stdint.h>
27
28#include "periph/i2c.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
37typedef struct {
39 uint8_t addr;
40} hih6130_t;
41
49void hih6130_init(hih6130_t *dev, i2c_t i2c, uint8_t address);
50
63 int32_t *humidity_milli_percent, int32_t *temperature_milli_celsius);
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* HIH6130_H */
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:151
Low-level I2C peripheral driver interface definition.
Device descriptor for HIH6130/HIH6131 sensors.
Definition hih6130.h:37
uint8_t addr
the slave address of the sensor on the I2C bus
Definition hih6130.h:39
i2c_t i2c
I2C device the sensor is connected to.
Definition hih6130.h:38