Firmware SDK
|
Driver for HARDWARIO CO2 Module. More...
Enumerations | |
enum | twr_module_co2_event_t { TWR_MODULE_CO2_EVENT_ERROR = TWR_LP8_EVENT_ERROR , TWR_MODULE_CO2_EVENT_UPDATE = TWR_LP8_EVENT_UPDATE } |
Callback events. More... | |
Functions | |
void | twr_module_co2_init (void) |
Initialize HARDWARIO CO2 Module. | |
void | twr_module_co2_set_event_handler (void(*event_handler)(twr_module_co2_event_t, void *), void *event_param) |
Set callback function. More... | |
void | twr_module_co2_set_update_interval (twr_tick_t interval) |
Set measurement interval. More... | |
bool | twr_module_co2_measure (void) |
Start measurement manually. More... | |
bool | twr_module_co2_get_concentration_ppm (float *ppm) |
Get CO2 concentration in ppm (parts per million) More... | |
bool | twr_module_co2_get_error (twr_lp8_error_t *error) |
Get last error code. More... | |
void | twr_module_co2_calibration (twr_lp8_calibration_t calibration) |
Request sensor calibration. More... | |
Driver for HARDWARIO CO2 Module.
Callback events.
Enumerator | |
---|---|
TWR_MODULE_CO2_EVENT_ERROR | Error event. |
TWR_MODULE_CO2_EVENT_UPDATE | Update event. |
Definition at line 13 of file twr_module_co2.h.
void twr_module_co2_calibration | ( | twr_lp8_calibration_t | calibration | ) |
Request sensor calibration.
[in] | calibration | Calibration type |
Definition at line 88 of file twr_module_co2.c.
bool twr_module_co2_get_concentration_ppm | ( | float * | ppm | ) |
Get CO2 concentration in ppm (parts per million)
[out] | ppm | Pointer to variable where result will be stored |
Definition at line 78 of file twr_module_co2.c.
bool twr_module_co2_get_error | ( | twr_lp8_error_t * | error | ) |
Get last error code.
[out] | pointer | to the variable where error code will be stored |
Definition at line 83 of file twr_module_co2.c.
bool twr_module_co2_measure | ( | void | ) |
Start measurement manually.
Definition at line 73 of file twr_module_co2.c.
void twr_module_co2_set_event_handler | ( | void(*)(twr_module_co2_event_t, void *) | event_handler, |
void * | event_param | ||
) |
Set callback function.
[in] | event_handler | Function address |
[in] | event_param | Optional event parameter (can be NULL) |
Definition at line 63 of file twr_module_co2.c.
void twr_module_co2_set_update_interval | ( | twr_tick_t | interval | ) |
Set measurement interval.
[in] | interval | Measurement interval |
Definition at line 68 of file twr_module_co2.c.