generated from IRNAS/irnas-zephyr-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbt_uss.h
55 lines (48 loc) · 1.48 KB
/
bt_uss.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/** @file bt_uss.h
*
* @brief Bluetooth service for user settings
*
* UUID of service: 8467a290-5ac0-4856-b3bc-85ae11a5bd81
* UUID of write+notify characteristic: 8467a291-5ac0-4856-b3bc-85ae11a5bd81
*
* The service uses the binary user settings protocol.
* Command can be written to the write characteristic and responses will be sent out on the
* notify characteristic.
*
* Details on the binary protocol can be found in library/protocol/binary
*
* Writing to the characteristic can fail, in which case it will return one of the following errors:
* - BT_ATT_ERR_ATTRIBUTE_NOT_FOUND (0x0a) if the setting ID sent does not exists
* - BT_ATT_ERR_NOT_SUPPORTED (0x06) if the command could not be parsed
* - BT_ATT_ERR_UNLIKELY (0x0e) if notification response could not be sent or if some other error
* occurred
*
* @par
* COPYRIGHT NOTICE: (c) 2023 Irnas. All rights reserved.
*/
#ifndef BT_USS_H
#define BT_USS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <zephyr/bluetooth/conn.h>
/**
* @brief Enable the USS Service
*
* This must be called in the Bluetooth connected handler
*
* @param[in] conn The bluetooth connection of the connected central device
*/
void bt_uss_enable(struct bt_conn *conn);
/**
* @brief Disable the USS Service
*
* This must be called in the Bluetooth disconnected handler
*
* @param[in] conn The bluetooth connection of the connected central device
*/
void bt_uss_disable(struct bt_conn *conn);
#ifdef __cplusplus
}
#endif
#endif /* BT_USS_H */