Skip to content

Commit a6f33a1

Browse files
committed
nrf_ble: Expose configuration of max number of characteristics and descriptors
1 parent 8b62315 commit a6f33a1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGattServer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class nRF5xGattServer : public GattServer
4343

4444

4545
private:
46-
const static unsigned BLE_TOTAL_CHARACTERISTICS = 20;
47-
const static unsigned BLE_TOTAL_DESCRIPTORS = 8;
46+
const static unsigned BLE_TOTAL_CHARACTERISTICS = NRF_SDH_BLE_TOTAL_CHARACTERISTICS;
47+
const static unsigned BLE_TOTAL_DESCRIPTORS = NRF_SDH_BLE_TOTAL_DESCRIPTORS;
4848
const static unsigned TOTAL_CONCURRENT_LONG_WRITE_REQUESTS = 3;
4949

5050
private:

features/FEATURE_BLE/targets/TARGET_NORDIC/mbed_lib.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
"help": "select whether to include the Service Changed characteristic in the GATT Server",
2626
"value": "1",
2727
"macro_name": "NRF_SDH_BLE_SERVICE_CHANGED"
28+
},
29+
"max_characteristics": {
30+
"help": "Sets the maximum number of characteristics that can be registered",
31+
"value": "20",
32+
"macro_name": "NRF_SDH_BLE_TOTAL_CHARACTERISTICS"
33+
},
34+
"max_descriptors": {
35+
"help": "Sets the maximum number of descriptors that can be registered",
36+
"value": "8",
37+
"macro_name": "NRF_SDH_BLE_TOTAL_DESCRIPTORS"
2838
}
2939
}
3040
}

0 commit comments

Comments
 (0)