Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hrs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_HRS_H_
8#define ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_HRS_H_
9
20#include <stdint.h>
21
22#include <zephyr/sys/slist.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
31#define BT_HRS_CONTROL_POINT_RESET_ENERGY_EXPANDED_REQ 0x01
32
34struct bt_hrs_cb {
40 void (*ntf_changed)(bool enabled);
41
56 int (*ctrl_point_write)(uint8_t request);
57
59 sys_snode_t _node;
60};
61
74
86
95int bt_hrs_notify(uint16_t heartrate);
96
97#ifdef __cplusplus
98}
99#endif
100
105#endif /* ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_HRS_H_ */
int bt_hrs_notify(uint16_t heartrate)
Notify heart rate measurement.
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.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Heart rate service callback structure.
Definition hrs.h:34
void(* ntf_changed)(bool enabled)
Heart rate notifications changed.
Definition hrs.h:40
int(* ctrl_point_write)(uint8_t request)
Heart rate control point write callback.
Definition hrs.h:56