nimble/gap: Make device name configurable via syscfg

This can still be overriden by app, as previously - it's just not
hardcoded.

X-Original-Commit: d8101a357beb0b541597f46e5f049af799063aff
This commit is contained in:
Andrzej Kaczmarek
2018-02-23 21:16:29 +01:00
parent e77d5460c6
commit 0256df284f
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -28,7 +28,8 @@
/* XXX: This should be configurable. */
#define BLE_SVC_GAP_NAME_MAX_LEN 31
static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] = "nimble";
static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static const uint8_t ble_svc_gap_appearance[2] = {
(MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE)) & 0xFF,
((MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE)) >> 8) & 0xFF
+5
View File
@@ -19,6 +19,11 @@
# Package: net/nimble/host/services/gap
syscfg.defs:
BLE_SVC_GAP_DEVICE_NAME:
description: >
Default value for "Device Name" characteristics, unless overwritten
by application.
value: '"nimble"'
BLE_SVC_GAP_APPEARANCE:
description: 'Device appearance'
value: 0