Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_tag_voc.h
1 #ifndef _BC_TAG_VOC_H
2 #define _BC_TAG_VOC_H
3 
4 #include <bc_sgp30.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
21 
23 
25 
29 
30 void bc_tag_voc_init(bc_tag_voc_t *self, bc_i2c_channel_t i2c_channel);
31 
36 
37 void bc_tag_voc_set_event_handler(bc_tag_voc_t *self, void (*event_handler)(bc_tag_voc_t *, bc_tag_voc_event_t, void *), void *event_param);
38 
42 
44 
49 
51 
57 
58 bool bc_tag_voc_get_co2eq_ppm(bc_tag_voc_t *self, uint16_t *ppm);
59 
65 
66 bool bc_tag_voc_get_tvoc_ppb(bc_tag_voc_t *self, uint16_t *ppb);
67 
73 
74 float bc_tag_voc_set_compensation(bc_tag_voc_t *self, float *t_celsius, float *rh_percentage);
75 
77 
78 #endif // _BC_TAG_VOC_H
uint64_t bc_tick_t
Timestamp data type.
Definition: bc_tick.h:16
void bc_tag_voc_init(bc_tag_voc_t *self, bc_i2c_channel_t i2c_channel)
Initialize BigClown VOC Tag.
Definition: bc_tag_voc.c:3
struct bc_sgp30_t bc_sgp30_t
SGP30 instance.
Definition: bc_sgp30.h:25
Error event.
Definition: bc_sgp30.h:16
void bc_tag_voc_set_update_interval(bc_tag_voc_t *self, bc_tick_t interval)
Set measurement interval.
Definition: bc_tag_voc.c:13
bool bc_tag_voc_measure(bc_tag_voc_t *self)
Start measurement manually.
Definition: bc_tag_voc.c:18
void bc_tag_voc_set_event_handler(bc_tag_voc_t *self, void(*event_handler)(bc_tag_voc_t *, bc_tag_voc_event_t, void *), void *event_param)
Set callback function.
Definition: bc_tag_voc.c:8
Error event.
Definition: bc_tag_voc.h:15
float bc_tag_voc_set_compensation(bc_tag_voc_t *self, float *t_celsius, float *rh_percentage)
Set sensor compensation (absolute humidity is calculated from temperature and relative humidity) ...
Definition: bc_tag_voc.c:33
bc_i2c_channel_t
I2C channels.
Definition: bc_i2c.h:15
bool bc_tag_voc_get_tvoc_ppb(bc_tag_voc_t *self, uint16_t *ppb)
Get measured TVOC in ppb (parts per billion)
Definition: bc_tag_voc.c:28
Update event.
Definition: bc_sgp30.h:19
Update event.
Definition: bc_tag_voc.h:18
bc_tag_voc_event_t
Callback events.
Definition: bc_tag_voc.h:12
bc_sgp30_t bc_tag_voc_t
BigClown VOC Tag instance.
Definition: bc_tag_voc.h:24
bool bc_tag_voc_get_co2eq_ppm(bc_tag_voc_t *self, uint16_t *ppm)
Get measured CO2eq in ppm (parts per million)
Definition: bc_tag_voc.c:23