Skip to content

Commit 2ce5075

Browse files
authored
feat(ble): Adds Characteristic User Descriptor
Adds a class for 0x2901 - Characteristic User Descriptor. This Descriptor is usual in BLE and describes with text what each characteristic is about.
1 parent c43187a commit 2ce5075

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

libraries/BLE/src/BLE2901.h

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
BLE2901.h
3+
4+
GATT Descriptor 0x2901 Characteristic User Description
5+
6+
The value of this description is a user-readable string
7+
describing the characteristic.
8+
9+
The Characteristic User Description descriptor
10+
provides a textual user description for a characteristic
11+
value.
12+
If the Writable Auxiliary bit of the Characteristics
13+
Properties is set then this descriptor is written. Only one
14+
User Description descriptor exists in a characteristic
15+
definition.
16+
17+
*/
18+
19+
#ifndef COMPONENTS_CPP_UTILS_BLE2901_H_
20+
#define COMPONENTS_CPP_UTILS_BLE2901_H_
21+
#include "soc/soc_caps.h"
22+
#if SOC_BLE_SUPPORTED
23+
24+
#include "sdkconfig.h"
25+
#if defined(CONFIG_BLUEDROID_ENABLED)
26+
27+
#include "BLEDescriptor.h"
28+
29+
class BLE2901 : public BLEDescriptor {
30+
public:
31+
BLE2901();
32+
void setDescription(String desc);
33+
}; // BLE2901
34+
35+
#endif /* CONFIG_BLUEDROID_ENABLED */
36+
#endif /* SOC_BLE_SUPPORTED */
37+
#endif /* COMPONENTS_CPP_UTILS_BLE2901_H_ */

0 commit comments

Comments
 (0)