Health Thermometer API#

API for the Health Thermometer GATT service This is a Low-Code component. At start, the temperature sensor has to be initialized. Once the BLE connection is established, the sl_bt_ht_temperature_measurement_indication_changed_cb() function will be called where either a single measurement can be done, or a timer started. A reference implementation for this function can be found in Bluetooth - SoC Thermometer example, in app.c file. The result of the measurement can be send using sl_bt_ht_temperature_measurement_indicate() function.

Enumerations#

enum
SL_BT_HT_TEMPERATURE_TYPE_ARMPIT = 1
SL_BT_HT_TEMPERATURE_TYPE_BODY
SL_BT_HT_TEMPERATURE_TYPE_EAR
SL_BT_HT_TEMPERATURE_TYPE_FINGER
SL_BT_HT_TEMPERATURE_TYPE_GASTRO_INTESTINAL_TRACT
SL_BT_HT_TEMPERATURE_TYPE_MOUTH
SL_BT_HT_TEMPERATURE_TYPE_RECTUM
SL_BT_HT_TEMPERATURE_TYPE_TOE
SL_BT_HT_TEMPERATURE_TYPE_TYMPANUM
}

Possible values of the Temperature Type characteristic (UUID: 2A1D)

Functions#

void
sl_bt_connection_closed_cb(uint16_t reason, uint8_t connection)
sl_status_t
sl_bt_ht_temperature_measurement_indicate(uint8_t connection, int32_t value, bool fahrenheit)
void
sl_bt_ht_temperature_measurement_indication_changed_cb(uint8_t connection, sl_bt_gatt_client_config_flag_t client_config)
void
sl_bt_ht_on_event(sl_bt_msg_t *evt)

Macros#

#define
SL_BT_HT_TEMPERATURE_TYPE SL_BT_HT_TEMPERATURE_TYPE_BODY

Enumeration Documentation#

sl_bt_ht_temperature_type#

sl_bt_ht_temperature_type

Possible values of the Temperature Type characteristic (UUID: 2A1D)

Enumerator
SL_BT_HT_TEMPERATURE_TYPE_ARMPIT
SL_BT_HT_TEMPERATURE_TYPE_BODY
SL_BT_HT_TEMPERATURE_TYPE_EAR
SL_BT_HT_TEMPERATURE_TYPE_FINGER
SL_BT_HT_TEMPERATURE_TYPE_GASTRO_INTESTINAL_TRACT
SL_BT_HT_TEMPERATURE_TYPE_MOUTH
SL_BT_HT_TEMPERATURE_TYPE_RECTUM
SL_BT_HT_TEMPERATURE_TYPE_TOE
SL_BT_HT_TEMPERATURE_TYPE_TYMPANUM

Definition at line 44 of file common/health_thermometer/sl_health_thermometer.h

Function Documentation#

sl_bt_connection_closed_cb#

void sl_bt_connection_closed_cb (uint16_t reason, uint8_t connection)
Parameters
[in]reason

Result code.

[in]connection

Handle of the closed connection

Callback to handle connection closed event. Note

  • To be implemented in user code.


Definition at line 62 of file common/health_thermometer/sl_health_thermometer.h

sl_bt_ht_temperature_measurement_indicate#

sl_status_t sl_bt_ht_temperature_measurement_indicate (uint8_t connection, int32_t value, bool fahrenheit)
Parameters
[in]connection

Connection handle of the client.

[in]value

Temperature value in millidegree.

[in]fahrenheit

Value is given in Fahrenheit (true) or Celsius (false).

Send Temperature Measurement characteristic indication to the client.


Definition at line 70 of file common/health_thermometer/sl_health_thermometer.h

sl_bt_ht_temperature_measurement_indication_changed_cb#

void sl_bt_ht_temperature_measurement_indication_changed_cb (uint8_t connection, sl_bt_gatt_client_config_flag_t client_config)
Parameters
[in]connection

Connection handle of the client.

[in]client_config

Characteristic Client Configuration Flag.

Temperature Measurement characteristic's CCCD has changed. Note

  • To be implemented in user code.


Definition at line 80 of file common/health_thermometer/sl_health_thermometer.h

sl_bt_ht_temperature_measurement_indication_confirmed_cb#

void sl_bt_ht_temperature_measurement_indication_confirmed_cb (uint8_t connection)
Parameters
[in]connection

Connection handle of the client.

Temperature Measurement characteristic indication confirmed. Note

  • To be implemented in user code.


Definition at line 88 of file common/health_thermometer/sl_health_thermometer.h

sl_bt_ht_on_event#

void sl_bt_ht_on_event (sl_bt_msg_t * evt)
Parameters
[in]evt

Event coming from the Bluetooth stack.

Bluetooth stack event handler.


Definition at line 94 of file common/health_thermometer/sl_health_thermometer.h

Macro Definition Documentation#

SL_BT_HT_MEASUREMENT_INTERVAL_SEC#

#define SL_BT_HT_MEASUREMENT_INTERVAL_SEC
Value:
1

Definition at line 44 of file common/health_thermometer/config/sl_health_thermometer_config.h

SL_BT_HT_TEMPERATURE_TYPE#

#define SL_BT_HT_TEMPERATURE_TYPE
Value:
SL_BT_HT_TEMPERATURE_TYPE_BODY

Definition at line 57 of file common/health_thermometer/config/sl_health_thermometer_config.h