|
Firmware SDK
|
Driver for HARDWARIO Temperature Module. More...
Typedefs | |
| typedef twr_tmp112_t | twr_tag_temperature_t |
| HARDWARIO Temperature Module instance. | |
Enumerations | |
| enum | twr_tag_temperature_i2c_address_t { TWR_TAG_TEMPERATURE_I2C_ADDRESS_DEFAULT = 0x48 , TWR_TAG_TEMPERATURE_I2C_ADDRESS_ALTERNATE = 0x49 } |
| I2C address. More... | |
| enum | twr_tag_temperature_event_t { TWR_TAG_TEMPERATURE_EVENT_ERROR = TWR_TMP112_EVENT_ERROR , TWR_TAG_TEMPERATURE_EVENT_UPDATE = TWR_TMP112_EVENT_UPDATE } |
| Callback events. More... | |
Driver for HARDWARIO Temperature Module.
Callback events.
| Enumerator | |
|---|---|
| TWR_TAG_TEMPERATURE_EVENT_ERROR | Error event. |
| TWR_TAG_TEMPERATURE_EVENT_UPDATE | Update event. |
Definition at line 24 of file twr_tag_temperature.h.
I2C address.
| Enumerator | |
|---|---|
| TWR_TAG_TEMPERATURE_I2C_ADDRESS_DEFAULT | Default I2C address. |
| TWR_TAG_TEMPERATURE_I2C_ADDRESS_ALTERNATE | Alternate I2C address. |
Definition at line 12 of file twr_tag_temperature.h.
| bool twr_tag_temperature_get_temperature_celsius | ( | twr_tag_temperature_t * | self, |
| float * | celsius | ||
| ) |
Get measured temperature in degrees of Celsius.
| [in] | self | Instance |
| [in] | celsius | Pointer to variable where result will be stored |
Definition at line 28 of file twr_tag_temperature.c.

| bool twr_tag_temperature_get_temperature_fahrenheit | ( | twr_tag_temperature_t * | self, |
| float * | fahrenheit | ||
| ) |
Get measured temperature in degrees of Fahrenheit.
| [in] | self | Instance |
| [in] | fahrenheit | Pointer to variable where result will be stored |
Definition at line 33 of file twr_tag_temperature.c.

| bool twr_tag_temperature_get_temperature_kelvin | ( | twr_tag_temperature_t * | self, |
| float * | kelvin | ||
| ) |
Get measured temperature in kelvin.
| [in] | self | Instance |
| [in] | kelvin | Pointer to variable where result will be stored |
Definition at line 38 of file twr_tag_temperature.c.

| bool twr_tag_temperature_get_temperature_raw | ( | twr_tag_temperature_t * | self, |
| int16_t * | raw | ||
| ) |
Get measured temperature as raw value.
| [in] | self | Instance |
| [in] | raw | Pointer to variable where result will be stored |
Definition at line 23 of file twr_tag_temperature.c.

| void twr_tag_temperature_init | ( | twr_tag_temperature_t * | self, |
| twr_i2c_channel_t | i2c_channel, | ||
| twr_tag_temperature_i2c_address_t | i2c_address | ||
| ) |
Initialize HARDWARIO Temperature Module.
| [in] | self | Instance |
| [in] | i2c_channel | I2C channel |
| [in] | i2c_address | I2C device address |
Definition at line 3 of file twr_tag_temperature.c.

| bool twr_tag_temperature_measure | ( | twr_tag_temperature_t * | self | ) |
Start measurement manually.
| [in] | self | Instance |
Definition at line 18 of file twr_tag_temperature.c.

| void twr_tag_temperature_set_event_handler | ( | twr_tag_temperature_t * | self, |
| void(*)(twr_tag_temperature_t *, twr_tag_temperature_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_temperature.c.

| void twr_tag_temperature_set_update_interval | ( | twr_tag_temperature_t * | self, |
| twr_tick_t | interval | ||
| ) |
Set measurement interval.
| [in] | self | Instance |
| [in] | interval | Measurement interval |
Definition at line 13 of file twr_tag_temperature.c.
