forked from kofal.net/zmk
fix(ble): enforce maximum length for dynamic device name (#2784)
This commit is contained in:
@@ -66,7 +66,9 @@ 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");
|
||||
BUILD_ASSERT(
|
||||
DEVICE_NAME_LEN <= CONFIG_BT_DEVICE_NAME_MAX,
|
||||
"ERROR: BLE device name is too long. Max length: " STRINGIFY(CONFIG_BT_DEVICE_NAME_MAX));
|
||||
|
||||
static struct bt_data zmk_ble_ad[] = {
|
||||
BT_DATA_BYTES(BT_DATA_GAP_APPEARANCE, 0xC1, 0x03),
|
||||
|
||||
Reference in New Issue
Block a user