1 #ifndef _TWR_TAG_VOC_LP_H
2 #define _TWR_TAG_VOC_LP_H
twr_i2c_channel_t
I2C channels.
struct twr_sgpc3_t twr_sgpc3_t
SGPC3 instance.
@ TWR_SGPC3_EVENT_UPDATE
Update event.
@ TWR_SGPC3_EVENT_ERROR
Error event.
void twr_tag_voc_lp_init(twr_tag_voc_lp_t *self, twr_i2c_channel_t i2c_channel)
Initialize HARDWARIO VOC-LP Module.
void twr_tag_voc_lp_set_update_interval(twr_tag_voc_lp_t *self, twr_tick_t interval)
Set measurement interval.
bool twr_tag_voc_lp_measure(twr_tag_voc_lp_t *self)
Start measurement manually.
float twr_tag_voc_lp_set_compensation(twr_tag_voc_lp_t *self, float *t_celsius, float *rh_percentage)
Set sensor compensation (absolute humidity is calculated from temperature and relative humidity)
void twr_tag_voc_lp_set_event_handler(twr_tag_voc_lp_t *self, void(*event_handler)(twr_tag_voc_lp_t *, twr_tag_voc_lp_event_t, void *), void *event_param)
Set callback function.
twr_sgpc3_t twr_tag_voc_lp_t
HARDWARIO VOC-LP Module instance.
bool twr_tag_voc_lp_get_tvoc_ppb(twr_tag_voc_lp_t *self, uint16_t *ppb)
Get measured TVOC in ppb (parts per billion)
twr_tag_voc_lp_event_t
Callback events.
@ TWR_TAG_VOC_LP_EVENT_ERROR
Error event.
@ TWR_TAG_VOC_LP_EVENT_UPDATE
Update event.
uint64_t twr_tick_t
Timestamp data type.