|
Firmware SDK
|
Driver for HARDWARIO VOC-LP Module. More...
Typedefs | |
| typedef twr_sgpc3_t | twr_tag_voc_lp_t |
| HARDWARIO VOC-LP Module instance. | |
Enumerations | |
| enum | twr_tag_voc_lp_event_t { TWR_TAG_VOC_LP_EVENT_ERROR = TWR_SGPC3_EVENT_ERROR , TWR_TAG_VOC_LP_EVENT_UPDATE = TWR_SGPC3_EVENT_UPDATE } |
| Callback events. More... | |
Functions | |
| void | twr_tag_voc_lp_init (twr_tag_voc_lp_t *self, twr_i2c_channel_t i2c_channel) |
| Initialize HARDWARIO VOC-LP Module. More... | |
| 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. More... | |
| void | twr_tag_voc_lp_set_update_interval (twr_tag_voc_lp_t *self, twr_tick_t interval) |
| Set measurement interval. More... | |
| bool | twr_tag_voc_lp_measure (twr_tag_voc_lp_t *self) |
| Start measurement manually. More... | |
| 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) More... | |
| 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) More... | |
Driver for HARDWARIO VOC-LP Module.
Callback events.
| Enumerator | |
|---|---|
| TWR_TAG_VOC_LP_EVENT_ERROR | Error event. |
| TWR_TAG_VOC_LP_EVENT_UPDATE | Update event. |
Definition at line 12 of file twr_tag_voc_lp.h.
| 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)
| [in] | self | Instance |
| [out] | ppb | Pointer to variable where result will be stored |
Definition at line 23 of file twr_tag_voc_lp.c.

| void twr_tag_voc_lp_init | ( | twr_tag_voc_lp_t * | self, |
| twr_i2c_channel_t | i2c_channel | ||
| ) |
Initialize HARDWARIO VOC-LP Module.
| [in] | self | Instance |
| [in] | i2c_channel | I2C channel |
Definition at line 3 of file twr_tag_voc_lp.c.

| bool twr_tag_voc_lp_measure | ( | twr_tag_voc_lp_t * | self | ) |
Start measurement manually.
| [in] | self | Instance |
Definition at line 18 of file twr_tag_voc_lp.c.

| 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)
| [in] | self | Instance |
| [in] | t_celsius | Pointer to variable holding temperature in degrees of celsius (must be NULL if not available) |
| [in] | rh_percentage | Pointer to variable holding relative humidity in percentage (must be NULL if not available) |
Definition at line 28 of file twr_tag_voc_lp.c.

| void twr_tag_voc_lp_set_event_handler | ( | twr_tag_voc_lp_t * | self, |
| void(*)(twr_tag_voc_lp_t *, twr_tag_voc_lp_event_t, void *) | event_handler, | ||
| void * | event_param | ||
| ) |
Set callback function.
| [in] | self | Instance |
| [in] | event_handler | Function address |
| [in] | event_param | Optional event parameter (can be NULL) |
Definition at line 8 of file twr_tag_voc_lp.c.

| void twr_tag_voc_lp_set_update_interval | ( | twr_tag_voc_lp_t * | self, |
| twr_tick_t | interval | ||
| ) |
Set measurement interval.
| [in] | self | Instance |
| [in] | interval | Measurement interval |
Definition at line 13 of file twr_tag_voc_lp.c.
