nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
bms.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef BT_BMS_H_
8#define BT_BMS_H_
9
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#include <stdlib.h>
21#include <zephyr/types.h>
22
38
43
45 const uint8_t *code;
46
48 uint16_t code_len;
49};
50
52struct bt_bms_cb {
65 bool (*authorize)(struct bt_conn *conn,
66 struct bt_bms_authorize_params *params);
67};
68
72 uint8_t supported : 1;
73
75 uint8_t authorize : 1;
76};
77
93
101
113int bt_bms_init(const struct bt_bms_init_params *init_params);
114
115
116#ifdef __cplusplus
117}
118#endif
119
124#endif /* BT_BMS_H_ */
bt_bms_op
BMS Control Point operation codes (LE transport).
Definition bms.h:24
@ BT_BMS_OP_DEL_REQ_BOND
Definition bms.h:28
@ BT_BMS_OP_DEL_REST_BONDS
Definition bms.h:36
@ BT_BMS_OP_DEL_ALL_BONDS
Definition bms.h:31
int bt_bms_init(const struct bt_bms_init_params *init_params)
Initialize the BMS Service.
const uint8_t * code
Definition bms.h:45
uint16_t code_len
Definition bms.h:48
enum bt_bms_op op_code
Definition bms.h:42
BMS authorization callback parameters.
Definition bms.h:40
bool(* authorize)(struct bt_conn *conn, struct bt_bms_authorize_params *params)
Definition bms.h:65
BMS server callback structure.
Definition bms.h:52
uint8_t authorize
Definition bms.h:75
uint8_t supported
Definition bms.h:72
Bitmask of supported features.
Definition bms.h:70
struct bt_bms_feature delete_all
Definition bms.h:81
struct bt_bms_feature delete_requesting
Definition bms.h:86
struct bt_bms_feature delete_rest
Definition bms.h:91
Bitmask set of supported features.
Definition bms.h:79
struct bt_bms_features features
Definition bms.h:99
struct bt_bms_cb * cbs
Definition bms.h:97
BMS initialization parameters.
Definition bms.h:95