1 #ifndef _TWR_TAG_BAROMETER_H
2 #define _TWR_TAG_BAROMETER_H
4 #include <twr_mpl3115a2.h>
twr_i2c_channel_t
I2C channels.
struct twr_mpl3115a2_t twr_mpl3115a2_t
MPL3115A2 instance.
@ TWR_MPL3115A2_EVENT_ERROR
Error event.
@ TWR_MPL3115A2_EVENT_UPDATE
Update event.
void twr_tag_barometer_init(twr_tag_barometer_t *self, twr_i2c_channel_t i2c_channel)
Initialize HARDWARIO Barometer Module.
bool twr_tag_barometer_get_altitude_meter(twr_tag_barometer_t *self, float *meter)
Get measured altitude in meters.
void twr_tag_barometer_set_update_interval(twr_tag_barometer_t *self, twr_tick_t interval)
Set measurement interval.
void twr_tag_barometer_set_event_handler(twr_tag_barometer_t *self, void(*event_handler)(twr_tag_barometer_t *, twr_tag_barometer_event_t, void *), void *event_param)
Set callback function.
bool twr_tag_barometer_measure(twr_tag_barometer_t *self)
Start measurement manually.
twr_mpl3115a2_t twr_tag_barometer_t
HARDWARIO Barometer Module instance.
bool twr_tag_barometer_get_pressure_pascal(twr_tag_barometer_t *self, float *pascal)
Get measured pressure in Pascal.
twr_tag_barometer_event_t
Callback events.
@ TWR_TAG_BAROMETER_EVENT_ERROR
Error event.
@ TWR_TAG_BAROMETER_EVENT_UPDATE
Update event.
uint64_t twr_tick_t
Timestamp data type.