You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/03/12 13:37:46 UTC

[mynewt-nimble] 12/32: nimble/gap: Make max device length configurable

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch new-master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 78617e16445892abbce5716932a67cb84d31e427
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Feb 23 23:07:06 2018 +0100

    nimble/gap: Make max device length configurable
    
    X-Original-Commit: a1122f0c7a942baf6e0c963fcae9b8df9484a27b
---
 nimble/host/services/gap/src/ble_svc_gap.c | 4 ++--
 nimble/host/services/gap/syscfg.yml        | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/nimble/host/services/gap/src/ble_svc_gap.c b/nimble/host/services/gap/src/ble_svc_gap.c
index bfdd0cf..49ccf9d 100644
--- a/nimble/host/services/gap/src/ble_svc_gap.c
+++ b/nimble/host/services/gap/src/ble_svc_gap.c
@@ -32,8 +32,8 @@
      MYNEWT_VAL(BLE_SVC_GAP_PPCP_SLAVE_LATENCY) || \
      MYNEWT_VAL(BLE_SVC_GAP_PPCP_SUPERVISION_TMO))
 
-/* XXX: This should be configurable. */
-#define BLE_SVC_GAP_NAME_MAX_LEN    31
+#define BLE_SVC_GAP_NAME_MAX_LEN \
+    MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH)
 
 static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;
 
diff --git a/nimble/host/services/gap/syscfg.yml b/nimble/host/services/gap/syscfg.yml
index 11aeaa9..136ac42 100644
--- a/nimble/host/services/gap/syscfg.yml
+++ b/nimble/host/services/gap/syscfg.yml
@@ -33,6 +33,9 @@ syscfg.defs:
                 BLE_GATT_CHR_F_WRITE_AUTHOR
             Set to '-1' to make characteristic read only.
         value: -1
+    BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH:
+        description: Maximum length for "Device Name" characteristics
+        value: 31
     BLE_SVC_GAP_APPEARANCE:
         description: 'Device appearance'
         value: 0

-- 
To stop receiving notification emails like this one, please contact
andk@apache.org.