Firmware SDK
|
Driver for HARDWARIO Climate Module. More...
Enumerations | |
enum | twr_module_climate_event_t { TWR_MODULE_CLIMATE_EVENT_ERROR_THERMOMETER = 0 , TWR_MODULE_CLIMATE_EVENT_ERROR_HYGROMETER = 1 , TWR_MODULE_CLIMATE_EVENT_ERROR_LUX_METER = 2 , TWR_MODULE_CLIMATE_EVENT_ERROR_BAROMETER = 3 , TWR_MODULE_CLIMATE_EVENT_UPDATE_THERMOMETER = 4 , TWR_MODULE_CLIMATE_EVENT_UPDATE_HYGROMETER = 5 , TWR_MODULE_CLIMATE_EVENT_UPDATE_LUX_METER = 6 , TWR_MODULE_CLIMATE_EVENT_UPDATE_BAROMETER = 7 } |
Callback events. More... | |
enum | twr_module_climate_revision_t { TWR_MODULE_CLIMATE_REVISION_R1 = 0 , TWR_MODULE_CLIMATE_REVISION_R2 = 1 } |
Climate Module hardware revision. More... | |
Functions | |
void | twr_module_climate_init (void) |
Initialize HARDWARIO Climate Module. | |
void | twr_module_climate_set_event_handler (void(*event_handler)(twr_module_climate_event_t, void *), void *event_param) |
Set callback function. More... | |
void | twr_module_climate_set_update_interval_all_sensors (twr_tick_t interval) |
Set measurement interval for all sensors. More... | |
void | twr_module_climate_set_update_interval_thermometer (twr_tick_t interval) |
Set measurement interval for thermometer. More... | |
void | twr_module_climate_set_update_interval_hygrometer (twr_tick_t interval) |
Set measurement interval for hygrometer. More... | |
void | twr_module_climate_set_update_interval_lux_meter (twr_tick_t interval) |
Set measurement interval for lux meter. More... | |
void | twr_module_climate_set_update_interval_barometer (twr_tick_t interval) |
Set measurement interval for barometer. More... | |
bool | twr_module_climate_measure_all_sensors (void) |
Start measurement of all sensors manually. More... | |
bool | twr_module_climate_measure_thermometer (void) |
Start thermometer measurement manually. More... | |
bool | twr_module_climate_measure_hygrometer (void) |
Start hygrometer measurement manually. More... | |
bool | twr_module_climate_measure_lux_meter (void) |
Start lux meter measurement manually. More... | |
bool | twr_module_climate_measure_barometer (void) |
Start barometer measurement manually. More... | |
bool | twr_module_climate_get_temperature_celsius (float *celsius) |
Get measured temperature in degrees of Celsius. More... | |
bool | twr_module_climate_get_temperature_fahrenheit (float *fahrenheit) |
Get measured temperature in degrees of Fahrenheit. More... | |
bool | twr_module_climate_get_temperature_kelvin (float *kelvin) |
Get measured temperature in kelvin. More... | |
bool | twr_module_climate_get_humidity_percentage (float *percentage) |
Get measured humidity as percentage. More... | |
bool | twr_module_climate_get_illuminance_lux (float *lux) |
Get measured illuminance in lux. More... | |
bool | twr_module_climate_get_altitude_meter (float *meter) |
Get measured altitude in meters. More... | |
bool | twr_module_climate_get_pressure_pascal (float *pascal) |
Get measured pressure in Pascal. More... | |
twr_module_climate_revision_t | twr_module_climate_get_revision (void) |
Get hardware revision. | |
Driver for HARDWARIO Climate Module.
Callback events.
Definition at line 12 of file twr_module_climate.h.
Climate Module hardware revision.
Enumerator | |
---|---|
TWR_MODULE_CLIMATE_REVISION_R1 | Hardware revision R1. |
TWR_MODULE_CLIMATE_REVISION_R2 | Hardware revision R2. |
Definition at line 42 of file twr_module_climate.h.
bool twr_module_climate_get_altitude_meter | ( | float * | meter | ) |
Get measured altitude in meters.
[in] | meter | Pointer to variable where result will be stored |
Definition at line 200 of file twr_module_climate.c.
bool twr_module_climate_get_humidity_percentage | ( | float * | percentage | ) |
Get measured humidity as percentage.
[in] | percentage | Pointer to variable where result will be stored |
Definition at line 186 of file twr_module_climate.c.
bool twr_module_climate_get_illuminance_lux | ( | float * | lux | ) |
Get measured illuminance in lux.
[in] | lux | Pointer to variable where result will be stored |
Definition at line 195 of file twr_module_climate.c.
bool twr_module_climate_get_pressure_pascal | ( | float * | pascal | ) |
Get measured pressure in Pascal.
[in] | pascal | Pointer to variable where result will be stored |
Definition at line 205 of file twr_module_climate.c.
bool twr_module_climate_get_temperature_celsius | ( | float * | celsius | ) |
Get measured temperature in degrees of Celsius.
[in] | celsius | Pointer to variable where result will be stored |
Definition at line 159 of file twr_module_climate.c.
bool twr_module_climate_get_temperature_fahrenheit | ( | float * | fahrenheit | ) |
Get measured temperature in degrees of Fahrenheit.
[in] | fahrenheit | Pointer to variable where result will be stored |
Definition at line 168 of file twr_module_climate.c.
bool twr_module_climate_get_temperature_kelvin | ( | float * | kelvin | ) |
Get measured temperature in kelvin.
[in] | kelvin | Pointer to variable where result will be stored |
Definition at line 177 of file twr_module_climate.c.
bool twr_module_climate_measure_all_sensors | ( | void | ) |
Start measurement of all sensors manually.
Definition at line 113 of file twr_module_climate.c.
bool twr_module_climate_measure_barometer | ( | void | ) |
Start barometer measurement manually.
Definition at line 154 of file twr_module_climate.c.
bool twr_module_climate_measure_hygrometer | ( | void | ) |
Start hygrometer measurement manually.
Definition at line 140 of file twr_module_climate.c.
bool twr_module_climate_measure_lux_meter | ( | void | ) |
Start lux meter measurement manually.
Definition at line 149 of file twr_module_climate.c.
bool twr_module_climate_measure_thermometer | ( | void | ) |
Start thermometer measurement manually.
Definition at line 135 of file twr_module_climate.c.
void twr_module_climate_set_event_handler | ( | void(*)(twr_module_climate_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 57 of file twr_module_climate.c.
void twr_module_climate_set_update_interval_all_sensors | ( | twr_tick_t | interval | ) |
Set measurement interval for all sensors.
[in] | interval | Measurement interval |
Definition at line 63 of file twr_module_climate.c.
void twr_module_climate_set_update_interval_barometer | ( | twr_tick_t | interval | ) |
Set measurement interval for barometer.
[in] | interval | Measurement interval |
Definition at line 108 of file twr_module_climate.c.
void twr_module_climate_set_update_interval_hygrometer | ( | twr_tick_t | interval | ) |
Set measurement interval for hygrometer.
[in] | interval | Measurement interval |
Definition at line 90 of file twr_module_climate.c.
void twr_module_climate_set_update_interval_lux_meter | ( | twr_tick_t | interval | ) |
Set measurement interval for lux meter.
[in] | interval | Measurement interval |
Definition at line 103 of file twr_module_climate.c.
void twr_module_climate_set_update_interval_thermometer | ( | twr_tick_t | interval | ) |
Set measurement interval for thermometer.
[in] | interval | Measurement interval |
Definition at line 81 of file twr_module_climate.c.