Firmware SDK
twr_module_climate.h
1 #ifndef _TWR_MODULE_CLIMATE_H
2 #define _TWR_MODULE_CLIMATE_H
3 
4 #include <twr_tick.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
22 
25 
28 
31 
34 
37 
39 
41 
42 typedef enum
43 {
46 
49 
51 
53 
54 void twr_module_climate_init(void);
55 
59 
60 void twr_module_climate_set_event_handler(void (*event_handler)(twr_module_climate_event_t, void *), void *event_param);
61 
64 
66 
69 
71 
74 
76 
79 
81 
84 
86 
90 
92 
96 
98 
102 
104 
108 
110 
114 
116 
121 
122 bool twr_module_climate_get_temperature_celsius(float *celsius);
123 
128 
129 bool twr_module_climate_get_temperature_fahrenheit(float *fahrenheit);
130 
135 
137 
142 
143 bool twr_module_climate_get_humidity_percentage(float *percentage);
144 
149 
151 
156 
157 bool twr_module_climate_get_altitude_meter(float *meter);
158 
163 
164 bool twr_module_climate_get_pressure_pascal(float *pascal);
165 
168 
170 
171 #endif // _TWR_MODULE_CLIMATE_H
void twr_module_climate_set_update_interval_barometer(twr_tick_t interval)
Set measurement interval for barometer.
bool twr_module_climate_get_temperature_kelvin(float *kelvin)
Get measured temperature in kelvin.
void twr_module_climate_set_update_interval_thermometer(twr_tick_t interval)
Set measurement interval for thermometer.
twr_module_climate_event_t
Callback events.
bool twr_module_climate_get_pressure_pascal(float *pascal)
Get measured pressure in Pascal.
bool twr_module_climate_get_temperature_fahrenheit(float *fahrenheit)
Get measured temperature in degrees of Fahrenheit.
bool twr_module_climate_measure_hygrometer(void)
Start hygrometer measurement manually.
bool twr_module_climate_get_temperature_celsius(float *celsius)
Get measured temperature in degrees of Celsius.
void twr_module_climate_set_event_handler(void(*event_handler)(twr_module_climate_event_t, void *), void *event_param)
Set callback function.
void twr_module_climate_set_update_interval_all_sensors(twr_tick_t interval)
Set measurement interval for all sensors.
bool twr_module_climate_measure_lux_meter(void)
Start lux meter measurement manually.
void twr_module_climate_init(void)
Initialize HARDWARIO Climate Module.
twr_module_climate_revision_t
Climate Module hardware revision.
bool twr_module_climate_measure_all_sensors(void)
Start measurement of all sensors manually.
bool twr_module_climate_measure_thermometer(void)
Start thermometer measurement manually.
twr_module_climate_revision_t twr_module_climate_get_revision(void)
Get hardware revision.
void twr_module_climate_set_update_interval_hygrometer(twr_tick_t interval)
Set measurement interval for hygrometer.
bool twr_module_climate_get_illuminance_lux(float *lux)
Get measured illuminance in lux.
bool twr_module_climate_measure_barometer(void)
Start barometer measurement manually.
bool twr_module_climate_get_humidity_percentage(float *percentage)
Get measured humidity as percentage.
void twr_module_climate_set_update_interval_lux_meter(twr_tick_t interval)
Set measurement interval for lux meter.
bool twr_module_climate_get_altitude_meter(float *meter)
Get measured altitude in meters.
@ TWR_MODULE_CLIMATE_EVENT_UPDATE_LUX_METER
Update event for lux meter.
@ TWR_MODULE_CLIMATE_EVENT_UPDATE_HYGROMETER
Update event for hygrometer.
@ TWR_MODULE_CLIMATE_EVENT_ERROR_BAROMETER
Error event for barometer.
@ TWR_MODULE_CLIMATE_EVENT_UPDATE_THERMOMETER
Update event for thermometer.
@ TWR_MODULE_CLIMATE_EVENT_ERROR_LUX_METER
Error event for lux meter.
@ TWR_MODULE_CLIMATE_EVENT_UPDATE_BAROMETER
Update event for barometer.
@ TWR_MODULE_CLIMATE_EVENT_ERROR_HYGROMETER
Error event for hygrometer.
@ TWR_MODULE_CLIMATE_EVENT_ERROR_THERMOMETER
Error event for thermometer.
@ TWR_MODULE_CLIMATE_REVISION_R2
Hardware revision R2.
@ TWR_MODULE_CLIMATE_REVISION_R1
Hardware revision R1.
uint64_t twr_tick_t
Timestamp data type.
Definition: twr_tick.h:16