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

Driver for BigClown Temperature Tag. More...

Typedefs

typedef bc_tmp112_t bc_tag_temperature_t
 BigClown Temperature Tag instance.
 

Enumerations

enum  bc_tag_temperature_i2c_address_t {
  BC_TAG_TEMPERATURE_I2C_ADDRESS_DEFAULT = 0x48,
  BC_TAG_TEMPERATURE_I2C_ADDRESS_ALTERNATE = 0x49
}
 I2C address. More...
 
enum  bc_tag_temperature_event_t {
  BC_TAG_TEMPERATURE_EVENT_ERROR = BC_TMP112_EVENT_ERROR,
  BC_TAG_TEMPERATURE_EVENT_UPDATE = BC_TMP112_EVENT_UPDATE
}
 Callback events. More...
 

Functions

void bc_tag_temperature_init (bc_tag_temperature_t *self, bc_i2c_channel_t i2c_channel, bc_tag_temperature_i2c_address_t i2c_address)
 Initialize BigClown Temperature Tag. More...
 
void bc_tag_temperature_set_event_handler (bc_tag_temperature_t *self, void(*event_handler)(bc_tag_temperature_t *, bc_tag_temperature_event_t, void *), void *event_param)
 Set callback function. More...
 
void bc_tag_temperature_set_update_interval (bc_tag_temperature_t *self, bc_tick_t interval)
 Set measurement interval. More...
 
bool bc_tag_temperature_measure (bc_tag_temperature_t *self)
 Start measurement manually. More...
 
bool bc_tag_temperature_get_temperature_raw (bc_tag_temperature_t *self, int16_t *raw)
 Get measured temperature as raw value. More...
 
bool bc_tag_temperature_get_temperature_celsius (bc_tag_temperature_t *self, float *celsius)
 Get measured temperature in degrees of Celsius. More...
 
bool bc_tag_temperature_get_temperature_fahrenheit (bc_tag_temperature_t *self, float *fahrenheit)
 Get measured temperature in degrees of Fahrenheit. More...
 
bool bc_tag_temperature_get_temperature_kelvin (bc_tag_temperature_t *self, float *kelvin)
 Get measured temperature in kelvin. More...
 

Detailed Description

Driver for BigClown Temperature Tag.

Enumeration Type Documentation

Callback events.

Enumerator
BC_TAG_TEMPERATURE_EVENT_ERROR 

Error event.

BC_TAG_TEMPERATURE_EVENT_UPDATE 

Update event.

Definition at line 24 of file bc_tag_temperature.h.

I2C address.

Enumerator
BC_TAG_TEMPERATURE_I2C_ADDRESS_DEFAULT 

Default I2C address.

BC_TAG_TEMPERATURE_I2C_ADDRESS_ALTERNATE 

Alternate I2C address.

Definition at line 12 of file bc_tag_temperature.h.

Function Documentation

bool bc_tag_temperature_get_temperature_celsius ( bc_tag_temperature_t self,
float *  celsius 
)

Get measured temperature in degrees of Celsius.

Parameters
[in]selfInstance
[in]celsiusPointer 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_temperature.c.

Here is the call graph for this function:

bool bc_tag_temperature_get_temperature_fahrenheit ( bc_tag_temperature_t self,
float *  fahrenheit 
)

Get measured temperature in degrees of Fahrenheit.

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

Definition at line 33 of file bc_tag_temperature.c.

Here is the call graph for this function:

bool bc_tag_temperature_get_temperature_kelvin ( bc_tag_temperature_t self,
float *  kelvin 
)

Get measured temperature in kelvin.

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

Definition at line 38 of file bc_tag_temperature.c.

Here is the call graph for this function:

bool bc_tag_temperature_get_temperature_raw ( bc_tag_temperature_t self,
int16_t *  raw 
)

Get measured temperature as raw value.

Parameters
[in]selfInstance
[in]rawPointer 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_temperature.c.

Here is the call graph for this function:

void bc_tag_temperature_init ( bc_tag_temperature_t self,
bc_i2c_channel_t  i2c_channel,
bc_tag_temperature_i2c_address_t  i2c_address 
)

Initialize BigClown Temperature Tag.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel
[in]i2c_addressI2C device address

Definition at line 3 of file bc_tag_temperature.c.

Here is the call graph for this function:

bool bc_tag_temperature_measure ( bc_tag_temperature_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_temperature.c.

Here is the call graph for this function:

void bc_tag_temperature_set_event_handler ( bc_tag_temperature_t self,
void(*)(bc_tag_temperature_t *, bc_tag_temperature_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_temperature.c.

Here is the call graph for this function:

void bc_tag_temperature_set_update_interval ( bc_tag_temperature_t self,
bc_tick_t  interval 
)

Set measurement interval.

Parameters
[in]selfInstance
[in]intervalMeasurement interval

Definition at line 13 of file bc_tag_temperature.c.

Here is the call graph for this function: