Firmware SDK
twr_tag_voc_lp.h
1 #ifndef _TWR_TAG_VOC_LP_H
2 #define _TWR_TAG_VOC_LP_H
3 
4 #include <twr_sgpc3.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
21 
23 
25 
29 
31 
36 
37 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);
38 
42 
44 
49 
51 
57 
58 bool twr_tag_voc_lp_get_tvoc_ppb(twr_tag_voc_lp_t *self, uint16_t *ppb);
59 
65 
66 float twr_tag_voc_lp_set_compensation(twr_tag_voc_lp_t *self, float *t_celsius, float *rh_percentage);
67 
69 
70 #endif // _TWR_TAG_VOC_LP_H
twr_i2c_channel_t
I2C channels.
Definition: twr_i2c.h:16
struct twr_sgpc3_t twr_sgpc3_t
SGPC3 instance.
Definition: twr_sgpc3.h:25
@ TWR_SGPC3_EVENT_UPDATE
Update event.
Definition: twr_sgpc3.h:19
@ TWR_SGPC3_EVENT_ERROR
Error event.
Definition: twr_sgpc3.h:16
void twr_tag_voc_lp_init(twr_tag_voc_lp_t *self, twr_i2c_channel_t i2c_channel)
Initialize HARDWARIO VOC-LP Module.
Definition: twr_tag_voc_lp.c:3
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.
Definition: twr_tag_voc_lp.c:8
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.
Definition: twr_tick.h:16