mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user