Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
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
19
20
#include <
stdint.h
>
21
22
#include <
zephyr/sys/slist.h
>
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
31
#define BT_HRS_CONTROL_POINT_RESET_ENERGY_EXPANDED_REQ 0x01
32
34
struct
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
73
int
bt_hrs_cb_register
(
struct
bt_hrs_cb
*cb);
74
85
int
bt_hrs_cb_unregister
(
struct
bt_hrs_cb
*cb);
86
95
int
bt_hrs_notify
(
uint16_t
heartrate);
96
97
#ifdef __cplusplus
98
}
99
#endif
100
104
105
#endif
/* ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_HRS_H_ */
bt_hrs_notify
int bt_hrs_notify(uint16_t heartrate)
Notify heart rate measurement.
bt_hrs_cb_register
int bt_hrs_cb_register(struct bt_hrs_cb *cb)
Heart rate service callback register.
bt_hrs_cb_unregister
int bt_hrs_cb_unregister(struct bt_hrs_cb *cb)
Heart rate service callback unregister.
sys_snode_t
struct _snode sys_snode_t
Single-linked list node structure.
Definition
slist.h:42
slist.h
Header file for the single-linked list API.
stdint.h
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
uint16_t
__UINT16_TYPE__ uint16_t
Definition
stdint.h:89
bt_hrs_cb
Heart rate service callback structure.
Definition
hrs.h:34
bt_hrs_cb::ntf_changed
void(* ntf_changed)(bool enabled)
Heart rate notifications changed.
Definition
hrs.h:40
bt_hrs_cb::ctrl_point_write
int(* ctrl_point_write)(uint8_t request)
Heart rate control point write callback.
Definition
hrs.h:56
zephyr
bluetooth
services
hrs.h
Generated on
for Zephyr API by
1.17.0