1 #ifndef _TWR_TAG_TEMPERATURE_H
2 #define _TWR_TAG_TEMPERATURE_H
4 #include <twr_tmp112.h>
twr_i2c_channel_t
I2C channels.
void twr_tag_temperature_init(twr_tag_temperature_t *self, twr_i2c_channel_t i2c_channel, twr_tag_temperature_i2c_address_t i2c_address)
Initialize HARDWARIO Temperature Module.
void twr_tag_temperature_set_event_handler(twr_tag_temperature_t *self, void(*event_handler)(twr_tag_temperature_t *, twr_tag_temperature_event_t, void *), void *event_param)
Set callback function.
void twr_tag_temperature_set_update_interval(twr_tag_temperature_t *self, twr_tick_t interval)
Set measurement interval.
bool twr_tag_temperature_get_temperature_celsius(twr_tag_temperature_t *self, float *celsius)
Get measured temperature in degrees of Celsius.
twr_tag_temperature_event_t
Callback events.
bool twr_tag_temperature_get_temperature_raw(twr_tag_temperature_t *self, int16_t *raw)
Get measured temperature as raw value.
bool twr_tag_temperature_get_temperature_fahrenheit(twr_tag_temperature_t *self, float *fahrenheit)
Get measured temperature in degrees of Fahrenheit.
bool twr_tag_temperature_get_temperature_kelvin(twr_tag_temperature_t *self, float *kelvin)
Get measured temperature in kelvin.
twr_tag_temperature_i2c_address_t
I2C address.
twr_tmp112_t twr_tag_temperature_t
HARDWARIO Temperature Module instance.
bool twr_tag_temperature_measure(twr_tag_temperature_t *self)
Start measurement manually.
@ TWR_TAG_TEMPERATURE_EVENT_ERROR
Error event.
@ TWR_TAG_TEMPERATURE_EVENT_UPDATE
Update event.
@ TWR_TAG_TEMPERATURE_I2C_ADDRESS_DEFAULT
Default I2C address.
@ TWR_TAG_TEMPERATURE_I2C_ADDRESS_ALTERNATE
Alternate I2C address.
uint64_t twr_tick_t
Timestamp data type.
struct twr_tmp112_t twr_tmp112_t
TMP112 instance.
@ TWR_TMP112_EVENT_ERROR
Error event.
@ TWR_TMP112_EVENT_UPDATE
Update event.