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#
Possible values of the Temperature Type characteristic (UUID: 2A1D)
Functions#
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 |
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)
[in] | reason | Result code. |
[in] | connection | Handle of the closed connection |
Callback to handle connection closed event. Note
To be implemented in user code.
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)
[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.
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)
[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.
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)
[in] | connection | Connection handle of the client. |
Temperature Measurement characteristic indication confirmed. Note
To be implemented in user code.
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)
[in] | evt | Event coming from the Bluetooth stack. |
Bluetooth stack event handler.
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_SECValue:
1
44
of file common/health_thermometer/config/sl_health_thermometer_config.h
SL_BT_HT_TEMPERATURE_TYPE#
#define SL_BT_HT_TEMPERATURE_TYPEValue:
SL_BT_HT_TEMPERATURE_TYPE_BODY
57
of file common/health_thermometer/config/sl_health_thermometer_config.h