This document describes the API specifications of software modules of the application running on the
Dialog DA14681 Wearable Development Kit. This manual intends to assist software developers who
implement applications using the DA14681 Wearable Development Kit.
AHRS Attitude and Heading Reference System
API Application Programming Interface
BAS Battery Service
BD Bluetooth Device (address)
BLE Bluetooth low energy
BMR Basal Metabolic Rate
CAS Custom Alarm Service
CC Constant Current (charging)
CIB Connection Interface Board
CV Constant Voltage (charging)
DK Development Kit
DWS Dialog Wearable Service
epoch time slot of a constant duration (wearables: 1 min)
FW Firmware
GAP Generic Access Profile
GATT Generic ATTribute profile
GDI Graphical Device Interface
GUI Graphical User Interface
HCS Health Care Service
HT Health Toolbox
KBSCN Keyboard Scanner
MEMS Micro Electro-Mechanical Systems
MTU Maximum Transmission Unit
NED North East Down (coordinate system)
NVDS Non-Volatile Data Storage
NVMS Non Volatile Memory Storage
RAM Random Access Memory
REM Rapid Eye Movement
Report Notification of sensor data and control
RTC Real Time Clock
SF Sensor Fusion
SFL Sensor Fusion Library
SOC State Of Charge
SUOTA Software Update Over The Air
UI User Interface
[1] UM-B-076_DA14681 Wearable Development Kit Software Manual.
[2] UM-B-044, DA1468x Software Platform reference, User Manual, Dialog Semiconductor.
[3] UM-B-056, DA1468x Software Developer's guide, User Manual, Dialog Semiconductor.
[4] AN-B-003, DA14580 Software Patching over the Air (SPotA), Application Note, Dialog
Semiconductor.
[5] HRS_SPEC, HEART RATE SERVICE SPECIFICATION v1.0, Bluetooth SIG.
[6] CTS_SPEC, CURRENT TIME SERVICE SPECIFICATION V1.1, Bluetooth SIG.
[7] BAS_SPEC, BATTERY SERVICE SPECIFICATION V1.1, Bluetooth SIG.
[8] LS013B7DH03, Datasheet, Sharp Microelectronics.
[9] UM-B-077, DA14681 Wearable Development Kit Hardware Manual, User Manual, Dialog
The Wearable Development Kit is a platform for development of wearables applications using
Dialog's DA14681 System on Chip solution combining an application processor, memories,
cryptography engine, power management unit, digital and analog peripherals and a Bluetooth®
Smart MAC engine and radio transceiver.
Figure 1: The Wearable Development Kit
The purpose of this user manual is to provide a brief overview of the architecture of the reference
software for Wearable Development Kit, provide the specification of the software modules and the
corresponding APIs.A more detailed description of the architecture, the set of necessary hardware
and software components for development on Wearable Development Kit and guidelines to install
and use the reference Smartphone/Tablet apps can be found in the user manual of the DA14681
wearable development kit [1].
4 Software Architecture Overview
The software architecture of the wearable application is outlined in the following image.
The application software is organized in FreeRTOS tasks running on the top of the DA1468x SDK.
All the details of DA1468x SDK can be found in [2] and [3].
The main software modules and tasks of the wearable application are the following:
●WRBL Task. This is the main task of the application and is responsible for the control and the
coordination of the other application tasks and transferring data from/to the BLE Services. It is
also responsible for controlling and handling events coming from the RTC, capacitive touchpads
and mechanical button. Finally, it is responsible for writing/reading application and configuration
data to/from the Flash memory.
● Health Toolbox. The health toolbox software module consists of two tasks.
○ Health Toolbox task. This task is responsible for controlling and accessing the peripheral
sensors for movement and HR monitoring. Health toolbox gets commands from WRBL task
regarding the configuration of sensors and health care services, it accesses sensors via the
Sensor Control software component, and provides the sensor data to WRBL task and Health
Care Services task. Finally it processes the output of Health Care Services task to send the
required health care data to Wearable task for further manipulation (storage in Flash memory,
displayed on TFT Display or transmitted over BLE via the corresponding service)
○Health Care Services task. This task consists of the algorithms for health care (Sleep
Quality Monitoring, Calories Counting and Heart Rate Monitoring), sensor fusion and
magneto calibration. It gets input sensor and configuration data from the Health toolbox task
and sends back the output of the algorithms.
●UI Task. This task is responsible for the graphical user interface of the wearable device display. It
gets commands from the WRBL task regarding the screen and the data to be displayed, the
status bar information, and other graphic effects such as blinking.
The wearable main task (WRBL) handles the data transfers between other tasks (e.g. step counter
data generated in the Health Toolbox task transferred to the UI task to be displayed and/or to the
BLE Manager task to be sent to a peer device). At a high level it controls the data flow to/from the
Health Toolbox, User Interface and BLE Manager tasks by sending the appropriate messages using
the corresponding API function calls.
It controls the data stored in the SPI Flash memory with the use of the data storage functions, which
provide a structured storage of the required data. Data types that are stored are the heart rate, steps,
calories and sleep quality, using minimum space in Flash memory. The lower level Flash operations
are performed by the SDK's NVMS adapter, which handles all necessary signaling.
5.1 BLE
Wearable task is using BLE profiles to communicate the produced data and receive commands from
a connected peer device. The task - profile interaction of the following profiles, due to their
complexity, are implemented in separate files andtheir API is described below.
Initialize the HCS component of the wearable task.
Parameters
None
Return Values
None
Notes
Function Name
void handle_connected_hcs(void);
Function Description
Function to inform the component of the new connection.
Parameters
None
Return Values
None
Notes
Function Name
bool hcs_update_remote_db(uint16_t conn_idx, uint32_t time,
hcs_op_code_t type);
Function Description
Function to initiate a database update to the peer device when there is an update in
the stored values.
Parameters
conn_idx Connection index
time Time of the oldest updated sample
type Type of the samples the update occurred
Return Values
True if the update was performed successfully, false if the update is scheduled to be
performed when the peer device connects and synchronizes database.
Touch event enumeration type defined as:
WRBL_TOUCH_SWIPE_RIGHT,
WRBL_TOUCH_SWIPE_UP,
WRBL_TOUCH_SWIPE_LEFT,
WRBL_TOUCH_SWIPE_DOWN,
5.1.4.1 Functions
wrbl_suota_init()
5.2 Interface
The wearable device's user inputs are the push button and two touch buttons. The two touch buttons
are used together to create a slide detection mechanism. Depending on what is displayed on the
screen the user can set time, date and alarm, and also control various states of the sensors and
services.
Button press enumeration type defined as:
BTN_SHORT_PRESS,
BTN_LONG_PRESS,
Function Name
void wrbl_button_init(handle_button_callback cb);
Function Description
Initialize button component of the wearable task.
Parameters
cb Callback function to be called when an event is produced
Return Values
None
Notes
Function Name
void handle_button_event();
Function Description
Function that handles the button notifications.
Parameters
None
Return Values
None
Notes
Function Name
void handle_button_callback(btn_press_t press);
Function Description
Callback function to be called when a new event is detected.
Parameters
press Event type
Return Values
None
Notes
Structures
ds_sample_size_t
ds_err_t
ds_data_type_t
5.2.2.1 Data Structures and Types
btn_press_t
5.2.2.2 Functions
wrbl_button_init()
handle_button_event()
5.2.2.3 Callback Functions
handle_button_callback()
5.3 System
5.3.1 Application Data Storage in NVM
Data Storage is an abstraction layer that provides the functionality for storing epoch data in Flash
memory using the Non-Volatile Memory Storage (NVMS) adapter of the SDK. A more detailed
description of the library can be found in the user manual of the DA14681 wearable development kit
Initializes the data storage module allocating required resources and initializes the
NVMS adapter.
Parameters
heart_rate_size Heart rate region size
step_size Step region size
calories_size Calories region size
sleep_size Sleep quality region size
Return Values
Pointer to the data storage object.
Notes
This function should be called only once (at system initialization) and if flash is not
erased, parameters must not change, otherwise a data corruption is to be presumed.
Creates a new chunk of data (epochs) in the data storage: finds the chronologically
last chunk and updates its length field (if needed), writes a new header and frees
space (if needed) by erasing or shrinking the chunks that follow it in Flash memory.
Parameters
ds Pointer of the data storage object
timestamp Initial timestap (timestamp of the first epoch)
data_type Data type of the epochs in the specific chunk
sample_size Size in bits of each epoch (valid: 2, 4, 8, 16 and 32 bits)
epoch_duration Duration of each epoch (constant for every sample in the
chunk)
Return Values
Status of the operation
Notes
Function must be called before any data can be written into flash using
data_storage_add_new_epoch().
Closes the selected record by writing out the number of epochs in the chunk in the
chunk's header or erasing the chunk header completely, if no epoch has been added.
Parameters
ds Pointer of the data storage object
data_type Data type of the epochs in the specific chunk
Return Values
Status of the operation
Notes
Can be called by the application at any time it is decided that no more epochs are
going to be written in the foreseeable future, e.g. when a sensor is turned off.
Takes a time reference (timestamp) and finds an epoch from that point onwards.
Returns a calculated header with the number of epochs from the specific epoch to the
chunk end.
Parameters
ds Pointer of the data storage object
data_type Data type of the epoch
req_timestamp Timestamp to search for
header Pointer to be filled with calculated header
address Pointer to be filled with address of the first epoch
Return Values
Status if an epoch with the provided parameters was found or not.
Updates the values of the referenced epochs with the ones provided. Epochs must be
already written once and also must be contained in a single chunk.
Parameters
ds Pointer of the data storage object
timestamp Timestamp of the first epoch to update
data_type Data type of the epochs
new_data Pointer to the buffer containing the new values
cnt Number of epochs to update
Handles any data storage exception (unexpected states or data) and erases the
corresponding section of the data storage Flash memory when in production mode.
Parameters
ds Pointer of the data storage object
data_type Data type of the epochs
Updates the battery and status of the component. Function reads the current battery
voltage to determine the power saving state and also reads the state of charge of the
system to update the value in the display and BAS profile.
Parameters
None
Return Values
None
Notes
Function Name
void handle_charging_msg(msg *wrbl_msg);
Function Description
Function handles messages of the wearable task about the charger state
Parameters
wrbl_msg Message to be handled
Return Values
None
Notes
Functions
wrbl_clk_mngr_init()
wrbl_clk_mngr_lower_clk()
wrbl_clk_mngr_raise_clk()
5.3.2 Battery
State of Charge is a functionality of the wearable device that produces an estimation of the battery
charge state as a percentage. To produce that estimation, the fuel gauge module is combined with
the ADC module using a Vbat + Ibat method to calculate the remaining battery charge.
cb Callback function to be called when an RTC event is
detected
Return Values
None
Notes
Function Name
void handle_rtc(void);
Function Description
Function handles the RTC events of the wearable task.
Parameters
None
Return Values
None
Notes
Function Name
void minute_evt(void);
Function Description
Function is called at each minute change to indicate the event.
Parameters
None
Return Values
None
Notes
Function Name
void alarm_evt(void);
Function Description
Function is called when the alarm event is triggered.
Parameters
None
Return Values
None
Notes
5.3.4.2 Functions
wrbl_rtc_init()
handle_rtc()
5.3.4.3 Callback Functions
minute_evt
alarm_evt
5.4 Wearable Health Toolbox Control
The Wearable Health Toolbox Control is an abstraction layer that provides easy control to health
toolbox functionality used by the wearable task and also combines the requirements of the various
interfaces that need access to the health toolbox resources. It operates as a bridge between the
DWS, HCS and UI control entry points and the health toolbox task.
Enables or disables the referenced sensor/service without changing its settings. It
stores the new state to be restored at startup when interface is enabled/disabled.
Parameters
iface Interface
sens Sensor/service
sens_state State of the sensor/service to be applied
This section presents the standard and custom BLE services used by the Wearable application.
6.1 Dialog Wearable Service
The Dialog Wearable Service (DWS) is a Dialog proprietary GATT service providing a means to:
● Transfer raw and calibrated sensor data.
● Transfer sensor fusion data.
● Configure the device, such as setting of operating parameters.
● Control the device, such as start/stop and load/store to non-volatile memory.
The DWS API specification structures and types are divided into two parts: the strictly DWS profile
(file dws.h, described in Section 6.1.1) and the IoT extension definitions (file IoT.h, described in
Section 6.1.2).
The Health Care Service (HCS) is a Dialog proprietary GATT service used to control, configure and
reading output data from Health Care services running on the Wearable DK. By supporting the GATT
client role a remote BLE central connected to the Wearable DK can perform the following operations:
● Enable/disable a Health Care service.
● Get/reset the current day's live counters of the Health Care services.
● Get updates of the latest epoch values for all services, while it is connected to the Wearable DK.
● Retrieve Health Care data stored in the Wearable DK Flash memory.
● Set the user's biometric information in the Wearable DK.
svc Service instance
conn_idx Connection index
num_of_epochs Number of epochs to notify
data Historical data payload
length Historical data payload length
Callback function to be called when a step counting/heart rate/sleep quality/calories
burned/body state classification configuration command is received.
Parameters
svc Service instance
conn_idx Connection index
cmd Service command
Callback function to be called when a service's historical data is requested.
Parameters
svc Service instance
conn_idx Connection index
op_code Service reference
timestamp Timestamp to start searching from
header Recovered header if data matching the criteria
was found
Return Values
Status of the operation
Notes
Upon return of the callback function, application has to send the corresponding data
using the hcs_notify_historical_data() function.
The SUOTA Service is a Dialog proprietary BLE service used for updating the firmware of BLE
devices. Details and service specification can be found in [4].
A complete API specification of the SUOTA implementation can be found in the Doxygen generated
files of the SDK and specifically in the file sdk_680/doc/html/dlg__suota_8h.html.
6.4 Current Time Service
The Current Time Service (CTS) is a standard BLE SIG service. It is used by the Wearable DK
software to update the system time from the peer central device (smartphone). The specification of
the service can be found in [6].
A complete API specification of the CTS implementation can be found in the Doxygen generated files
of the SDK and specifically in the file sdk_680/doc/html/cts_8h.html.
6.5 Heart Rate Service
The Heart Rate Service (HRS) is a standard BLE SIG service. It is used by the Wearable DK
software, as an alternative to the HCS service, for sending heart rate samples to the peer central
device (smartphone). The specification of the service can be found in [5].
A complete API specification of the HRS implementation can be found in the Doxygen generated files
of the SDK and specifically in the file sdk_680/doc/html/hrs_8h.html.
6.6 Battery Service
The Battery Service (BAS) is a standard BLE SIG service. It is used by the Wearable DK software to
send the current battery status to the peer central device (smartphone). The specification of the
service can be found in [7].
A complete API specification of the BAS implementation can be found in the Doxygen generated files
of the SDK and specifically in the file sdk_680/doc/html/bas_8h.html.
The UI task is the upper layer in communication with the LS013B7DH03 display. The UI task
functions can be called from other tasks (e.g. the WRBL task) for specific operations on the
LS013B7DH03 via the GUI and the display driver API.
The GUI module is the middle layer in communication with the LS013B7DH03 display. There is a set
of Graphical Device Interface (GDI) functions, images and widgets that can be called from the upper
layers (UI task) for specific operations on the LS013B7DH03 via the display driver API.
item Pointer to suitable screen widget
format Format string
Return Values
None
Notes
ui_register_status_bar()
ui_unregister_status_bar()
7.2.2.9 Text Box Functions
ui_draw_textbox()
ui_textbox_set_text()
8 Health Toolbox
The main objective of the Health Toolbox software component is to implement all appropriate
functionality for the control and data manipulation related to:
●Sensor modules integrated in the Wearable DK device, targeting mainly environment, human
●Services/algorithms processing sensor data and producing human motion and healthcare related
metrics, which determine an estimate of human physical activity and health status.
Based on this basic classification of control and data flows determining the general execution flow
inside the Health Toolbox component, three main types of functionality can be identified and
corresponding software implementation parts, as shown in Figure 5:
●The relatively low level control of sensor modules for the appropriate data acquisition, involving
register accesses and interrupt-handling processes and being implemented by:
○ Sensor Control component
○ BMI160, BMM150 and BME280 sensor module drivers
○ DI5115 sensor module driver
● The processing of sensor data and their transformation to more sophisticated ones, involving the
execution of specialized algorithms and being implemented by:
○Health Care Services Task, supporting the following services:
●The core functionality of coordinating the control and data flows inside the Health Toolbox
component, so that a unified easy-to-use sensor services configuration and data acquisition
framework can be offered to the upper application layers (i.e. Wearable Main Application). That
functionality is implemented by the Health Toolbox Task.
Figure 5: Health Toolbox Component Software Architecture
Table 17: Basic Health Toolbox API Sensors/Services Configuration Functions
Note 1 Only when KIWI Services component is enabled.
8.1 Health Toolbox Task
The API provided by the Health Toolbox Task includes functions for initializing and controlling its
operation, configuring the supported/integrated sensors and services, and finally acquiring the
sensors/services' configuration state and last data. All these functions and respective data
structures/types being defined in the API are summarized below:
Initializes Health Toolbox, setting initial values to the internal variables and structures,
creating a FreeRTOS task for control coordination and data manipulation, and
initializing services, sensors (putting to suspend mode) and other processes being
supported. Function callbacks may be set to the ht_handle_t instance handle, so that
control and data indications can be sent.
Parameters
handle the handle structure of Health Toolbox
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
All callback functions defined in ht_handle_t structure are optional.
Function Name
ht_handle_t* ht_get_handle(void)
Function Description
Gets the handle structure of Health Toolbox.
Parameters
None
Return Values
Pointer to the handle structure of Health Toolbox.
Notes
Function Name
ht_error_t ht_clear(void)
Function Description
Clears Health Toolbox, freeing previously allocated resources. If the respective
function pointer is defined in ht_handle_t instance handle, a clear-done indication is
sent via ht_clear_done() callback function.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_start(void)
Function Description
Starts Health Toolbox, configuring with default parameter values the services being
supported. If the respective function pointer is defined in ht_handle_t instance
handle, a start-done indication is sent via ht_start_done() callback function.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_stop(void)
Function Description
Stops Health Toolbox, disabling all services being supported. If the respective function
pointer is defined in ht_handle_t instance handle, a stop-done indication is sent via ht_stop_done() callback function.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Sends RTC tick notification to Health Toolbox. If RTC interval is not appropriate for
Health Toolbox operation, RTC tick notification is ignored.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_upf(ht_upf_config_t* config)
Function Description
Configures user profile attributes. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_UPF.
Parameters
config the configuration structure of user profile attributes
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures sensor fusion coefficients. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_SF_COEFFS.
Parameters
config the configuration structure of sensor fusion coefficients
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures magnetometer calibration coefficients. If the respective function pointer is
defined in ht_handle_t instance handle, a config-done indication is sent via
ht_config_done() callback function, setting parameter type to
HT_CONFIG_CALIBR_COEFFS_MAG.
Parameters
configthe configuration structure of magnetometer calibration coefficients
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures magnetometer calibration control. If the respective function pointer is
defined in ht_handle_t instance handle, a config-done indication is sent via
ht_config_done() callback function, setting parameter type to
HT_CONFIG_CALIBR_CONTROL_MAG.
A calibration-control-changed indication is sent via ht_calibr_done() callback
function, setting parameter type to HT_CALIBR_CONTROL_MAG.
A calibration-done indication is sent via ht_calibr_done() callback function, setting
parameter type to HT_CALIBR_COEFFS_MAG.
Parameters
configthe configuration structure of magnetometer calibration control
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures accelerometer calibration offsets. If the respective function pointer is
defined in ht_handle_t instance handle, a config-done indication is sent via
ht_config_done() callback function, setting parameter type to
HT_CONFIG_CALIBR_OFFSETS_ACC.
Parameters
configthe configuration structure of accelerometer calibration offsets
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Updates accelerometer calibration offsets. If the respective function pointer is defined
in ht_handle_t instance handle, a config-done indication is sent via
ht_config_done() callback function, setting parameter type to
HT_CONFIG_CALIBR_OFFSETS_ACC_UPDATE.
A calibration-done indication is sent via ht_calibr_done() callback function, setting
parameter type to HT_CALIBR_OFFSETS_ACC.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_acc(ht_acc_config_t* config)
Function Description
Configures accelerometer sensor. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_ACC.
Accelerometer data indications are sent via ht_data_indication() callback function,
setting parameter type to HT_SENSOR_TYPE_ACC.
Parameters
config the configuration structure of accelerometer sensor
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures gyroscope sensor. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_GYR.
Gyroscope data indications are sent via ht_data_indication() callback function,
setting parameter type to HT_SENSOR_TYPE_GYR.
Parameters
config the configuration structure of gyroscope sensor
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_mag(ht_mag_config_t* config)
Function Description
Configures magnetometer sensor. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_MAG.
Magnetometer data indications are sent via ht_data_indication() callback function,
setting parameter type to HT_SENSOR_TYPE_MAG.
Parameters
config the configuration structure of magnetometer sensor
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_env(ht_env_config_t* config)
Function Description
Configures environmental sensors. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_ENV.
Environmental data indications are sent via ht_data_indication() callback function,
setting parameter type to HT_SENSOR_TYPE_ENV.
Parameters
config the configuration structure of environmental sensors
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_sc(ht_sc_config_t* config)
Function Description
Configures step counting service. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_SC.
Step counting service data indications are sent via ht_data_indication() callback
function, setting parameter type to HT_SERVICE_TYPE_SC.
Parameters
config the configuration structure of step counting service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures sensor fusion service. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_SF.
Sensor fusion service data indications are sent via ht_data_indication() callback
function, setting parameter type to HT_SERVICE_TYPE_SF.
Parameters
config the configuration structure of sensor fusion service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_hr(ht_hr_config_t* config)
Function Description
Configures heart rate estimation service. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_HR.
Heart rate estimation service data indications are sent via ht_data_indication()
callback function, setting parameter type to HT_SERVICE_TYPE_HR.
Parameters
configthe configuration structure of heart rate estimation service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_sq(ht_sq_config_t* config)
Function Description
Configures sleep quality monitoring service. If the respective function pointer is
defined in ht_handle_t instance handle, a config-done indication is sent via ht_config_done() callback function, setting parameter type to HT_CONFIG_SQ.
Sleep quality monitoring service data indications are sent via ht_data_indication()
callback function, setting parameter type to HT_SERVICE_TYPE_SQ.
Parameters
configthe configuration structure of slep quality monitoring service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_cc(ht_cc_config_t* config)
Function Description
Configures calories counting service. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_CC.
Calories counting service data indications are sent via ht_data_indication()
callback function, setting parameter type to HT_SERVICE_TYPE_CC.
Parameters
config the configuration structure of calories counting service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Configures body state classification service. If the respective function pointer is
defined in ht_handle_t instance handle, a config-done indication is sent via ht_config_done() callback function, setting parameter type to HT_CONFIG_BS.
Body state classification service data indications are sent via ht_data_indication()
callback function, setting parameter type to HT_SERVICE_TYPE_BS.
Parameters
configthe configuration structure of body state classification service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_config_s1(ht_s1_config_t* config)
Function Description
Configures (template) s1 service. If the respective function pointer is defined in
ht_handle_t instance handle, a config-done indication is sent via ht_config_done()
callback function, setting parameter type to HT_CONFIG_S1.
(Template) s1 service data indications are sent via ht_data_indication() callback
function, setting parameter type to HT_SERVICE_TYPE_S1.
Parameters
config the configuration structure of (template) s1 service
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
bool ht_isrunning(void)
Function Description
Checks if Health Toolbox task is running.
Parameters
None
Return Values
true if running; false if not running
Notes
Function Name
ht_error_t ht_time_get_now_ms(uint32_t* now)
Function Description
Gets local time indicated by a sensor module clock in ms.
Parameters
now the address to store the local time
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_upf(void)
Function Description
Gets configuration status of user profile attributes. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_UPF.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Gets configuration status of sensor fusion coefficients. If the respective function
pointer is defined in ht_handle_t instance handle, a state-get-done indication is sent
via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_SF_COEFFS.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Gets configuration status of magnetometer calibration coefficients for a specific
calibration mode. If the respective function pointer is defined in ht_handle_t instance
handle, a state-get-done indication is sent via ht_state_get_done() callback function,
carrying the configuration status structure and setting parameter type to
HT_STATE_CALIBR_COEFFS_MAG.
Parameters
cal_mode the calibration mode to which calibration coefficients refer
Gets configuration status of magnetometer calibration control for a specific calibration
mode. If the respective function pointer is defined in ht_handle_t instance handle, a
state-get-done indication is sent via ht_state_get_done() callback function, carrying
the configuration status structure and setting parameter type to
HT_STATE_CALIBR_CONTROL_MAG.
Parameters
cal_mode the calibration mode to which calibration control refers
Gets configuration status of accelerometer sensor. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_ACC.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_gyr(void)
Function Description
Gets configuration status of gyroscope sensor. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_GYR.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_mag(void)
Function Description
Gets configuration status of magnetometer sensor. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_MAG.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_env(void)
Function Description
Gets configuration status of environmental sensors. If the respective function pointer
is defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_ENV.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_sc(void)
Function Description
Gets configuration status of step counting service. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_SC.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Gets configuration status of sensor fusion service. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_SF.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_hr(void)
Function Description
Gets configuration status of heart rate estimation service. If the respective function
pointer is defined in ht_handle_t instance handle, a state-get-done indication is sent
via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_HR.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_sq(void)
Function Description
Gets configuration status of sleep quality monitoring service. If the respective function
pointer is defined in ht_handle_t instance handle, a state-get-done indication is sent
via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_SQ.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_cc(void)
Function Description
Gets configuration status of calories counting service. If the respective function pointer
is defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_CC.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Gets configuration status of body state classification service. If the respective function
pointer is defined in ht_handle_t instance handle, a state-get-done indication is sent
via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_BS.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
Function Name
ht_error_t ht_state_get_s1(void)
Function Description
Gets configuration status of (template) s1 service. If the respective function pointer is
defined in ht_handle_t instance handle, a state-get-done indication is sent via ht_state_get_done() callback function, carrying the configuration status structure
and setting parameter type to HT_STATE_S1.
Parameters
None
Return Values
HT_SUCCESS for successful execution; ≥ HT_FAIL for error
Notes
ht_state_get_s1()
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.