Skip to content

Commit 9603702

Browse files
author
carlescufi
committed
Add support for adding descriptors
1 parent f631751 commit 9603702

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

public/GattCharacteristic.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,16 @@ class GattCharacteristic : public GattAttribute
330330
uint8_t getProperties(void) const {
331331
return _properties;
332332
}
333+
uint8_t getDescriptorCount(void) const {
334+
return _descriptorCount;
335+
}
336+
GattAttribute *getDescriptor(uint8_t index) {
337+
if (index >= _descriptorCount) {
338+
return NULL;
339+
}
340+
341+
return _descriptors[index];
342+
}
333343

334344
private:
335345
uint8_t _properties;

public/GattServer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class GattServer
110110
protected:
111111
uint8_t serviceCount;
112112
uint8_t characteristicCount;
113+
uint8_t descriptorCount;
113114

114115
private:
115116
ServerEventCallback_t onDataSent;

0 commit comments

Comments
 (0)