summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorNick Winans <nick@winans.codes>2021-01-30 15:47:11 -0600
committerPete Johanson <peter@peterjohanson.com>2021-02-02 00:59:17 -0500
commit82173f354e36e9dad4a7db49a61a4eebcef95ccf (patch)
treebb185ba86bd4ed20bab87d661eaa574c3e09ba31 /app/src
parent4e20bf5de17e9d1c8adca66be08469c28981a945 (diff)
fix(core): Assert BLE device name is correct length
Diffstat (limited to 'app/src')
-rw-r--r--app/src/ble.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/ble.c b/app/src/ble.c
index c51391c..b15a079 100644
--- a/app/src/ble.c
+++ b/app/src/ble.c
@@ -63,6 +63,8 @@ static uint8_t active_profile;
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)
+BUILD_ASSERT(DEVICE_NAME_LEN <= 16, "ERROR: BLE device name is too long. Max length: 16");
+
#define IS_HOST_PERIPHERAL \
(!IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL))
#define IS_SPLIT_PERIPHERAL \