Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
|
Heart Rate Service (HRS) . More...
Data Structures | |
struct | bt_hrs_cb |
Heart rate service callback structure. More... | |
Macros | |
#define | BT_HRS_CONTROL_POINT_RESET_ENERGY_EXPANDED_REQ 0x01 |
Server shall restart the accumulation of energy expended from zero. | |
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.
#define BT_HRS_CONTROL_POINT_RESET_ENERGY_EXPANDED_REQ 0x01 |
#include <zephyr/bluetooth/services/hrs.h>
Server shall restart the accumulation of energy expended from zero.
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. |