Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_tag_barometer

Driver for BigClown Barometer Tag. More...

Typedefs

typedef bc_mpl3115a2_t bc_tag_barometer_t
 BigClown Barometer Tag instance.
 

Enumerations

enum  bc_tag_barometer_event_t {
  BC_TAG_BAROMETER_EVENT_ERROR = BC_MPL3115A2_EVENT_ERROR,
  BC_TAG_BAROMETER_EVENT_UPDATE = BC_MPL3115A2_EVENT_UPDATE
}
 Callback events. More...
 

Functions

void bc_tag_barometer_init (bc_tag_barometer_t *self, bc_i2c_channel_t i2c_channel)
 Initialize BigClown Barometer Tag. More...
 
void bc_tag_barometer_set_event_handler (bc_tag_barometer_t *self, void(*event_handler)(bc_tag_barometer_t *, bc_tag_barometer_event_t, void *), void *event_param)
 Set callback function. More...
 
void bc_tag_barometer_set_update_interval (bc_tag_barometer_t *self, bc_tick_t interval)
 Set measurement interval. More...
 
bool bc_tag_barometer_measure (bc_tag_barometer_t *self)
 Start measurement manually. More...
 
bool bc_tag_barometer_get_altitude_meter (bc_tag_barometer_t *self, float *meter)
 Get measured altitude in meters. More...
 
bool bc_tag_barometer_get_pressure_pascal (bc_tag_barometer_t *self, float *pascal)
 Get measured pressure in Pascal. More...
 

Detailed Description

Driver for BigClown Barometer Tag.

Enumeration Type Documentation

Callback events.

Enumerator
BC_TAG_BAROMETER_EVENT_ERROR 

Error event.

BC_TAG_BAROMETER_EVENT_UPDATE 

Update event.

Definition at line 12 of file bc_tag_barometer.h.

Function Documentation

bool bc_tag_barometer_get_altitude_meter ( bc_tag_barometer_t self,
float *  meter 
)

Get measured altitude in meters.

Parameters
[in]selfInstance
[in]meterPointer to variable where result will be stored
Returns
true When value is valid
false When value is invalid

Definition at line 23 of file bc_tag_barometer.c.

Here is the call graph for this function:

bool bc_tag_barometer_get_pressure_pascal ( bc_tag_barometer_t self,
float *  pascal 
)

Get measured pressure in Pascal.

Parameters
[in]selfInstance
[in]pascalPointer to variable where result will be stored
Returns
true When value is valid
false When value is invalid

Definition at line 28 of file bc_tag_barometer.c.

Here is the call graph for this function:

void bc_tag_barometer_init ( bc_tag_barometer_t self,
bc_i2c_channel_t  i2c_channel 
)

Initialize BigClown Barometer Tag.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel

Definition at line 3 of file bc_tag_barometer.c.

Here is the call graph for this function:

bool bc_tag_barometer_measure ( bc_tag_barometer_t self)

Start measurement manually.

Parameters
[in]selfInstance
Returns
true On success
false When other measurement is in progress

Definition at line 18 of file bc_tag_barometer.c.

Here is the call graph for this function:

void bc_tag_barometer_set_event_handler ( bc_tag_barometer_t self,
void(*)(bc_tag_barometer_t *, bc_tag_barometer_event_t, void *)  event_handler,
void *  event_param 
)

Set callback function.

Parameters
[in]selfInstance
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)

Definition at line 8 of file bc_tag_barometer.c.

Here is the call graph for this function:

void bc_tag_barometer_set_update_interval ( bc_tag_barometer_t self,
bc_tick_t  interval 
)

Set measurement interval.

Parameters
[in]selfInstance
[in]intervalMeasurement interval

Definition at line 13 of file bc_tag_barometer.c.

Here is the call graph for this function: