Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Heart Rate Service (HRS) More...
Data Structures | |
struct | bt_hrs_cb |
Heart rate service callback structure. More... | |
Functions | |
int | bt_hrs_cb_register (struct bt_hrs_cb *cb) |
Heart rate service callback register. | |
int | bt_hrs_cb_unregister (struct bt_hrs_cb *cb) |
Heart rate service callback unregister. | |
int | bt_hrs_notify (uint16_t heartrate) |
Notify heart rate measurement. | |
Heart Rate Service (HRS)
[Experimental] Users should note that the APIs can change as a part of ongoing development.
int bt_hrs_cb_register | ( | struct bt_hrs_cb * | cb | ) |
#include <zephyr/bluetooth/services/hrs.h>
Heart rate service callback register.
This function will register callbacks that will be called in certain events related to Heart rate service.
cb | Pointer to callbacks structure. Must point to memory that remains valid until unregistered. |
cb
is NULL int bt_hrs_cb_unregister | ( | struct bt_hrs_cb * | cb | ) |
#include <zephyr/bluetooth/services/hrs.h>
Heart rate service callback unregister.
This function will unregister callback from Heart rate service.
cb | Pointer to callbacks structure |
cb
is NULL cb
was not found in registered callbacks int bt_hrs_notify | ( | uint16_t | heartrate | ) |
#include <zephyr/bluetooth/services/hrs.h>
Notify heart rate measurement.
This will send a GATT notification to all current subscribers.
heartrate | The heartrate measurement in beats per minute. |