1 #ifndef _TWR_TAG_HUMIDITY_H
2 #define _TWR_TAG_HUMIDITY_H
4 #include <twr_hts221.h>
5 #include <twr_hdc2080.h>
struct twr_hdc2080_t twr_hdc2080_t
HDC2080 instance.
struct twr_hts221_t twr_hts221_t
HTS221 instance.
twr_i2c_channel_t
I2C channels.
struct twr_sht20_t twr_sht20_t
SHT20 instance.
struct twr_sht30_t twr_sht30_t
SHT30 instance.
bool twr_tag_humidity_get_temperature_raw(twr_tag_humidity_t *self, uint16_t *raw)
Get measured temperature as raw value.
bool twr_tag_humidity_measure(twr_tag_humidity_t *self)
Start measurement manually.
struct twr_tag_humidity_t twr_tag_humidity_t
HARDWARIO Humidity Module instance.
void twr_tag_humidity_set_update_interval(twr_tag_humidity_t *self, twr_tick_t interval)
Set measurement interval.
twr_tag_humidity_revision_t
Humidity Tag hardware revision.
bool twr_tag_humidity_get_humidity_raw(twr_tag_humidity_t *self, uint16_t *raw)
Get measured humidity as raw value.
bool twr_tag_humidity_get_temperature_celsius(twr_tag_humidity_t *self, float *celsius)
Get measured temperature in degrees of Celsius.
bool twr_tag_humidity_get_humidity_percentage(twr_tag_humidity_t *self, float *percentage)
Get measured humidity as percentage.
twr_tag_humidity_i2c_address_t
I2C address.
void twr_tag_humidity_init(twr_tag_humidity_t *self, twr_tag_humidity_revision_t revision, twr_i2c_channel_t i2c_channel, twr_tag_humidity_i2c_address_t i2c_address)
Initialize HARDWARIO Humidity Module.
twr_tag_humidity_event_t
Callback events.
void twr_tag_humidity_set_event_handler(twr_tag_humidity_t *self, void(*event_handler)(twr_tag_humidity_t *, twr_tag_humidity_event_t, void *), void *event_param)
Set callback function.
@ TWR_TAG_HUMIDITY_REVISION_R3
Hardware revision R3.
@ TWR_TAG_HUMIDITY_REVISION_R1
Hardware revision R1.
@ TWR_TAG_HUMIDITY_REVISION_R2
Hardware revision R2.
@ TWR_TAG_HUMIDITY_REVISION_R4
Hardware revision R4.
@ TWR_TAG_HUMIDITY_I2C_ADDRESS_DEFAULT
Default I2C address.
@ TWR_TAG_HUMIDITY_I2C_ADDRESS_ALTERNATE
Alternate I2C address.
@ TWR_TAG_HUMIDITY_EVENT_UPDATE
Update event.
@ TWR_TAG_HUMIDITY_EVENT_ERROR
Error event.
uint64_t twr_tick_t
Timestamp data type.