Firmware SDK
|
Driver for HARDWARIO Barometer Module. More...
Typedefs | |
typedef twr_mpl3115a2_t | twr_tag_barometer_t |
HARDWARIO Barometer Module instance. | |
Enumerations | |
enum | twr_tag_barometer_event_t { TWR_TAG_BAROMETER_EVENT_ERROR = TWR_MPL3115A2_EVENT_ERROR , TWR_TAG_BAROMETER_EVENT_UPDATE = TWR_MPL3115A2_EVENT_UPDATE } |
Callback events. More... | |
Functions | |
void | twr_tag_barometer_init (twr_tag_barometer_t *self, twr_i2c_channel_t i2c_channel) |
Initialize HARDWARIO Barometer Module. More... | |
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. More... | |
void | twr_tag_barometer_set_update_interval (twr_tag_barometer_t *self, twr_tick_t interval) |
Set measurement interval. More... | |
bool | twr_tag_barometer_measure (twr_tag_barometer_t *self) |
Start measurement manually. More... | |
bool | twr_tag_barometer_get_altitude_meter (twr_tag_barometer_t *self, float *meter) |
Get measured altitude in meters. More... | |
bool | twr_tag_barometer_get_pressure_pascal (twr_tag_barometer_t *self, float *pascal) |
Get measured pressure in Pascal. More... | |
Driver for HARDWARIO Barometer Module.
Callback events.
Enumerator | |
---|---|
TWR_TAG_BAROMETER_EVENT_ERROR | Error event. |
TWR_TAG_BAROMETER_EVENT_UPDATE | Update event. |
Definition at line 12 of file twr_tag_barometer.h.
bool twr_tag_barometer_get_altitude_meter | ( | twr_tag_barometer_t * | self, |
float * | meter | ||
) |
Get measured altitude in meters.
[in] | self | Instance |
[in] | meter | Pointer to variable where result will be stored |
Definition at line 23 of file twr_tag_barometer.c.
bool twr_tag_barometer_get_pressure_pascal | ( | twr_tag_barometer_t * | self, |
float * | pascal | ||
) |
Get measured pressure in Pascal.
[in] | self | Instance |
[in] | pascal | Pointer to variable where result will be stored |
Definition at line 28 of file twr_tag_barometer.c.
void twr_tag_barometer_init | ( | twr_tag_barometer_t * | self, |
twr_i2c_channel_t | i2c_channel | ||
) |
Initialize HARDWARIO Barometer Module.
[in] | self | Instance |
[in] | i2c_channel | I2C channel |
Definition at line 3 of file twr_tag_barometer.c.
bool twr_tag_barometer_measure | ( | twr_tag_barometer_t * | self | ) |
Start measurement manually.
[in] | self | Instance |
Definition at line 18 of file twr_tag_barometer.c.
void twr_tag_barometer_set_event_handler | ( | twr_tag_barometer_t * | self, |
void(*)(twr_tag_barometer_t *, twr_tag_barometer_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_barometer.c.
void twr_tag_barometer_set_update_interval | ( | twr_tag_barometer_t * | self, |
twr_tick_t | interval | ||
) |
Set measurement interval.
[in] | self | Instance |
[in] | interval | Measurement interval |
Definition at line 13 of file twr_tag_barometer.c.