diff --git a/samples/bluetooth/peripheral/prj.conf b/samples/bluetooth/peripheral/prj.conf index 79810cb40ff8..9a56b2c12256 100644 --- a/samples/bluetooth/peripheral/prj.conf +++ b/samples/bluetooth/peripheral/prj.conf @@ -6,7 +6,7 @@ CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_DIS=y +CONFIG_BT_DIS=y CONFIG_BT_ATT_PREPARE_COUNT=5 CONFIG_BT_BAS=y CONFIG_BT_HRS=y diff --git a/samples/bluetooth/peripheral_csc/prj.conf b/samples/bluetooth/peripheral_csc/prj.conf index 73d86ca1469c..fc1993bc808f 100644 --- a/samples/bluetooth/peripheral_csc/prj.conf +++ b/samples/bluetooth/peripheral_csc/prj.conf @@ -2,8 +2,8 @@ CONFIG_ENTROPY_GENERATOR=y CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_BT=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_DIS=y -CONFIG_BT_GATT_DIS_PNP=n +CONFIG_BT_DIS=y +CONFIG_BT_DIS_PNP=n CONFIG_BT_BAS=y CONFIG_BT_DEVICE_NAME="CSC peripheral" CONFIG_BT_DEVICE_APPEARANCE=1157 diff --git a/samples/bluetooth/peripheral_dis/prj.conf b/samples/bluetooth/peripheral_dis/prj.conf index 3b88987ce0e6..4fed0a4e66fe 100644 --- a/samples/bluetooth/peripheral_dis/prj.conf +++ b/samples/bluetooth/peripheral_dis/prj.conf @@ -1,18 +1,18 @@ CONFIG_BT=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_DIS=y -CONFIG_BT_GATT_DIS_PNP=n -CONFIG_BT_GATT_DIS_MODEL="Zephyr Model" -CONFIG_BT_GATT_DIS_MANUF="Zephyr" -CONFIG_BT_GATT_DIS_SERIAL_NUMBER=y -CONFIG_BT_GATT_DIS_FW_REV=y -CONFIG_BT_GATT_DIS_HW_REV=y -CONFIG_BT_GATT_DIS_SW_REV=y -CONFIG_BT_GATT_DIS_SERIAL_NUMBER_STR="Zephyr Serial" -CONFIG_BT_GATT_DIS_FW_REV_STR="Zephyr Firmware" -CONFIG_BT_GATT_DIS_HW_REV_STR="Zephyr Hardware" -CONFIG_BT_GATT_DIS_SW_REV_STR="Zephyr Software" +CONFIG_BT_DIS=y +CONFIG_BT_DIS_PNP=n +CONFIG_BT_DIS_MODEL="Zephyr Model" +CONFIG_BT_DIS_MANUF="Zephyr" +CONFIG_BT_DIS_SERIAL_NUMBER=y +CONFIG_BT_DIS_FW_REV=y +CONFIG_BT_DIS_HW_REV=y +CONFIG_BT_DIS_SW_REV=y +CONFIG_BT_DIS_SERIAL_NUMBER_STR="Zephyr Serial" +CONFIG_BT_DIS_FW_REV_STR="Zephyr Firmware" +CONFIG_BT_DIS_HW_REV_STR="Zephyr Hardware" +CONFIG_BT_DIS_SW_REV_STR="Zephyr Software" CONFIG_BT_DEVICE_NAME="DIS peripheral" @@ -22,5 +22,5 @@ CONFIG_SETTINGS_RUNTIME=y CONFIG_SETTINGS=y CONFIG_SETTINGS_NONE=y -CONFIG_BT_GATT_DIS_SETTINGS=y -CONFIG_BT_GATT_DIS_STR_MAX=21 +CONFIG_BT_DIS_SETTINGS=y +CONFIG_BT_DIS_STR_MAX=21 diff --git a/samples/bluetooth/peripheral_dis/src/main.c b/samples/bluetooth/peripheral_dis/src/main.c index c043afa354a4..733ef3361779 100644 --- a/samples/bluetooth/peripheral_dis/src/main.c +++ b/samples/bluetooth/peripheral_dis/src/main.c @@ -47,32 +47,32 @@ static struct bt_conn_cb conn_callbacks = { static int settings_runtime_load(void) { -#if defined(CONFIG_BT_GATT_DIS_SETTINGS) +#if defined(CONFIG_BT_DIS_SETTINGS) settings_runtime_set("bt/dis/model", "Zephyr Model", sizeof("Zephyr Model")); settings_runtime_set("bt/dis/manuf", "Zephyr Manufacturer", sizeof("Zephyr Manufacturer")); -#if defined(CONFIG_BT_GATT_DIS_SERIAL_NUMBER) +#if defined(CONFIG_BT_DIS_SERIAL_NUMBER) settings_runtime_set("bt/dis/serial", - CONFIG_BT_GATT_DIS_SERIAL_NUMBER_STR, - sizeof(CONFIG_BT_GATT_DIS_SERIAL_NUMBER_STR)); + CONFIG_BT_DIS_SERIAL_NUMBER_STR, + sizeof(CONFIG_BT_DIS_SERIAL_NUMBER_STR)); #endif -#if defined(CONFIG_BT_GATT_DIS_SW_REV) +#if defined(CONFIG_BT_DIS_SW_REV) settings_runtime_set("bt/dis/sw", - CONFIG_BT_GATT_DIS_SW_REV_STR, - sizeof(CONFIG_BT_GATT_DIS_SW_REV_STR)); + CONFIG_BT_DIS_SW_REV_STR, + sizeof(CONFIG_BT_DIS_SW_REV_STR)); #endif -#if defined(CONFIG_BT_GATT_DIS_FW_REV) +#if defined(CONFIG_BT_DIS_FW_REV) settings_runtime_set("bt/dis/fw", - CONFIG_BT_GATT_DIS_FW_REV_STR, - sizeof(CONFIG_BT_GATT_DIS_FW_REV_STR)); + CONFIG_BT_DIS_FW_REV_STR, + sizeof(CONFIG_BT_DIS_FW_REV_STR)); #endif -#if defined(CONFIG_BT_GATT_DIS_HW_REV) +#if defined(CONFIG_BT_DIS_HW_REV) settings_runtime_set("bt/dis/hw", - CONFIG_BT_GATT_DIS_HW_REV_STR, - sizeof(CONFIG_BT_GATT_DIS_HW_REV_STR)); + CONFIG_BT_DIS_HW_REV_STR, + sizeof(CONFIG_BT_DIS_HW_REV_STR)); #endif #endif return 0; diff --git a/samples/bluetooth/peripheral_esp/prj.conf b/samples/bluetooth/peripheral_esp/prj.conf index fde02fa69da5..70f9b5d27e2f 100644 --- a/samples/bluetooth/peripheral_esp/prj.conf +++ b/samples/bluetooth/peripheral_esp/prj.conf @@ -3,7 +3,7 @@ CONFIG_BT_PERIPHERAL=y CONFIG_BT_SMP=y CONFIG_TINYCRYPT=y CONFIG_BT_DEVICE_NAME="ESP peripheral" -CONFIG_BT_GATT_DIS=y -CONFIG_BT_GATT_DIS_PNP=n +CONFIG_BT_DIS=y +CONFIG_BT_DIS_PNP=n CONFIG_BT_BAS=y CONFIG_BT_DEVICE_APPEARANCE=768 diff --git a/samples/bluetooth/peripheral_hids/prj.conf b/samples/bluetooth/peripheral_hids/prj.conf index e2751b599dca..bf0c5165042d 100644 --- a/samples/bluetooth/peripheral_hids/prj.conf +++ b/samples/bluetooth/peripheral_hids/prj.conf @@ -5,7 +5,7 @@ CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_DIS=y +CONFIG_BT_DIS=y CONFIG_BT_BAS=y CONFIG_BT_DEVICE_NAME="Test HoG mouse" CONFIG_BT_DEVICE_APPEARANCE=962 diff --git a/samples/bluetooth/peripheral_hr/prj.conf b/samples/bluetooth/peripheral_hr/prj.conf index 8040326913ba..18815731973a 100644 --- a/samples/bluetooth/peripheral_hr/prj.conf +++ b/samples/bluetooth/peripheral_hr/prj.conf @@ -2,8 +2,8 @@ CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_DIS=y -CONFIG_BT_GATT_DIS_PNP=n +CONFIG_BT_DIS=y +CONFIG_BT_DIS_PNP=n CONFIG_BT_BAS=y CONFIG_BT_HRS=y CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor" diff --git a/samples/bluetooth/peripheral_ht/prj.conf b/samples/bluetooth/peripheral_ht/prj.conf index 253ca946fcb2..48b21d9f8746 100644 --- a/samples/bluetooth/peripheral_ht/prj.conf +++ b/samples/bluetooth/peripheral_ht/prj.conf @@ -2,8 +2,8 @@ CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_GATT_DIS=y -CONFIG_BT_GATT_DIS_PNP=n +CONFIG_BT_DIS=y +CONFIG_BT_DIS_PNP=n CONFIG_BT_BAS=y CONFIG_BT_DEVICE_NAME="Zephyr Health Thermometer" CONFIG_BT_DEVICE_APPEARANCE=768 diff --git a/subsys/bluetooth/services/CMakeLists.txt b/subsys/bluetooth/services/CMakeLists.txt index b82b5553f6f6..deb0c0552825 100644 --- a/subsys/bluetooth/services/CMakeLists.txt +++ b/subsys/bluetooth/services/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 -zephyr_sources_ifdef(CONFIG_BT_GATT_DIS dis.c) +zephyr_sources_ifdef(CONFIG_BT_DIS dis.c) zephyr_sources_ifdef(CONFIG_BT_BAS bas.c) diff --git a/subsys/bluetooth/services/Kconfig.dis b/subsys/bluetooth/services/Kconfig.dis index 2759f79b14ee..d73d92896500 100644 --- a/subsys/bluetooth/services/Kconfig.dis +++ b/subsys/bluetooth/services/Kconfig.dis @@ -3,46 +3,46 @@ # Copyright (c) 2018 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -menuconfig BT_GATT_DIS +menuconfig BT_DIS bool "Enable GATT Device Information service" -if BT_GATT_DIS +if BT_DIS -config BT_GATT_DIS_SETTINGS +config BT_DIS_SETTINGS bool "Enable Settings usage in Device Information Service" help Enable Settings usage in Device Information Service. -config BT_GATT_DIS_STR_MAX +config BT_DIS_STR_MAX int "Maximum size in bytes for DIS strings" - depends on BT_GATT_DIS_SETTINGS + depends on BT_DIS_SETTINGS default 21 range 2 248 help Bluetooth DIS string storage size. Storage can be up to 248 bytes long (excluding NULL termination). -config BT_GATT_DIS_MODEL +config BT_DIS_MODEL string "Model name" default SOC help The device model inside Device Information Service. -config BT_GATT_DIS_MANUF +config BT_DIS_MANUF string "Manufacturer name" default "Manufacturer" help The device manufacturer inside Device Information Service. -config BT_GATT_DIS_PNP +config BT_DIS_PNP bool "Enable PnP_ID characteristic" default y help Enable PnP_ID characteristic in Device Information Service. -if BT_GATT_DIS_PNP +if BT_DIS_PNP -config BT_GATT_DIS_PNP_VID_SRC +config BT_DIS_PNP_VID_SRC int "Vendor ID source" range 1 2 default 1 @@ -53,7 +53,7 @@ config BT_GATT_DIS_PNP_VID_SRC - 1 Bluetooth SIG, the Vendor ID was assigned by the Bluetooth SIG - 2 USB IF, the Vendor ID was assigned by the USB IF -config BT_GATT_DIS_PNP_VID +config BT_DIS_PNP_VID hex "Vendor ID" range 0 0xFFFF default 0 @@ -67,7 +67,7 @@ config BT_GATT_DIS_PNP_VID Device providers should procure the Vendor ID from the USB Implementers Forum or the Company Identifier from the Bluetooth SIG. -config BT_GATT_DIS_PNP_PID +config BT_DIS_PNP_PID hex "Product ID" range 0 0xFFFF default 0 @@ -76,7 +76,7 @@ config BT_GATT_DIS_PNP_PID made by the vendor identified with the Vendor ID field. The vendors themselves manage Product ID field values. -config BT_GATT_DIS_PNP_VER +config BT_DIS_PNP_VER hex "Product Version" range 0 0xFFFF default 1 @@ -95,50 +95,50 @@ config BT_GATT_DIS_PNP_VER made to the device, it is recommended that the major version number be incremented. The sub-minor version is incremented for bug fixes. -endif # BT_GATT_DIS_PNP +endif # BT_DIS_PNP -config BT_GATT_DIS_SERIAL_NUMBER +config BT_DIS_SERIAL_NUMBER bool "Enable DIS Serial number characteristic" help Enable Serial Number characteristic in Device Information Service. -config BT_GATT_DIS_SERIAL_NUMBER_STR +config BT_DIS_SERIAL_NUMBER_STR string "Serial Number" - depends on BT_GATT_DIS_SERIAL_NUMBER + depends on BT_DIS_SERIAL_NUMBER help Enable Serial Number characteristic in Device Information Service. -config BT_GATT_DIS_FW_REV +config BT_DIS_FW_REV bool "Enable DIS Firmware Revision characteristic" help Enable Firmware Revision characteristic in Device Information Service. -config BT_GATT_DIS_FW_REV_STR +config BT_DIS_FW_REV_STR string "Firmware revision" - depends on BT_GATT_DIS_FW_REV + depends on BT_DIS_FW_REV help Enable firmware revision characteristic in Device Information Service. -config BT_GATT_DIS_HW_REV +config BT_DIS_HW_REV bool "Enable DIS Hardware Revision characteristic" help Enable Hardware Revision characteristic in Device Information Service. -config BT_GATT_DIS_HW_REV_STR +config BT_DIS_HW_REV_STR string "Hardware revision" - depends on BT_GATT_DIS_HW_REV + depends on BT_DIS_HW_REV help Enable hardware revision characteristic in Device Information Service. -config BT_GATT_DIS_SW_REV +config BT_DIS_SW_REV bool "Enable DIS Software Revision characteristic" help Enable Software Revision characteristic in Device Information Service. -config BT_GATT_DIS_SW_REV_STR +config BT_DIS_SW_REV_STR string "Software revision" - depends on BT_GATT_DIS_SW_REV + depends on BT_DIS_SW_REV help Enable software revision characteristic in Device Information Service. -endif # BT_GATT_DIS +endif # BT_DIS diff --git a/subsys/bluetooth/services/dis.c b/subsys/bluetooth/services/dis.c index affdfa75c6f7..00d92255ba7a 100644 --- a/subsys/bluetooth/services/dis.c +++ b/subsys/bluetooth/services/dis.c @@ -29,7 +29,7 @@ #define LOG_MODULE_NAME bt_dis #include "common/log.h" -#if CONFIG_BT_GATT_DIS_PNP +#if CONFIG_BT_DIS_PNP struct dis_pnp { uint8_t pnp_vid_src; uint16_t pnp_vid; @@ -38,50 +38,50 @@ struct dis_pnp { } __packed; static struct dis_pnp dis_pnp_id = { - .pnp_vid_src = CONFIG_BT_GATT_DIS_PNP_VID_SRC, - .pnp_vid = CONFIG_BT_GATT_DIS_PNP_VID, - .pnp_pid = CONFIG_BT_GATT_DIS_PNP_PID, - .pnp_ver = CONFIG_BT_GATT_DIS_PNP_VER, + .pnp_vid_src = CONFIG_BT_DIS_PNP_VID_SRC, + .pnp_vid = CONFIG_BT_DIS_PNP_VID, + .pnp_pid = CONFIG_BT_DIS_PNP_PID, + .pnp_ver = CONFIG_BT_DIS_PNP_VER, }; #endif -#if defined(CONFIG_BT_GATT_DIS_SETTINGS) -static uint8_t dis_model[CONFIG_BT_GATT_DIS_STR_MAX] = CONFIG_BT_GATT_DIS_MODEL; -static uint8_t dis_manuf[CONFIG_BT_GATT_DIS_STR_MAX] = CONFIG_BT_GATT_DIS_MANUF; -#if defined(CONFIG_BT_GATT_DIS_SERIAL_NUMBER) -static uint8_t dis_serial_number[CONFIG_BT_GATT_DIS_STR_MAX] = - CONFIG_BT_GATT_DIS_SERIAL_NUMBER_STR; +#if defined(CONFIG_BT_DIS_SETTINGS) +static uint8_t dis_model[CONFIG_BT_DIS_STR_MAX] = CONFIG_BT_DIS_MODEL; +static uint8_t dis_manuf[CONFIG_BT_DIS_STR_MAX] = CONFIG_BT_DIS_MANUF; +#if defined(CONFIG_BT_DIS_SERIAL_NUMBER) +static uint8_t dis_serial_number[CONFIG_BT_DIS_STR_MAX] = + CONFIG_BT_DIS_SERIAL_NUMBER_STR; #endif -#if defined(CONFIG_BT_GATT_DIS_FW_REV) -static uint8_t dis_fw_rev[CONFIG_BT_GATT_DIS_STR_MAX] = - CONFIG_BT_GATT_DIS_FW_REV_STR; +#if defined(CONFIG_BT_DIS_FW_REV) +static uint8_t dis_fw_rev[CONFIG_BT_DIS_STR_MAX] = + CONFIG_BT_DIS_FW_REV_STR; #endif -#if defined(CONFIG_BT_GATT_DIS_HW_REV) -static uint8_t dis_hw_rev[CONFIG_BT_GATT_DIS_STR_MAX] = - CONFIG_BT_GATT_DIS_HW_REV_STR; +#if defined(CONFIG_BT_DIS_HW_REV) +static uint8_t dis_hw_rev[CONFIG_BT_DIS_STR_MAX] = + CONFIG_BT_DIS_HW_REV_STR; #endif -#if defined(CONFIG_BT_GATT_DIS_SW_REV) -static uint8_t dis_sw_rev[CONFIG_BT_GATT_DIS_STR_MAX] = - CONFIG_BT_GATT_DIS_SW_REV_STR; +#if defined(CONFIG_BT_DIS_SW_REV) +static uint8_t dis_sw_rev[CONFIG_BT_DIS_STR_MAX] = + CONFIG_BT_DIS_SW_REV_STR; #endif -#define BT_GATT_DIS_MODEL_REF dis_model -#define BT_GATT_DIS_MANUF_REF dis_manuf -#define BT_GATT_DIS_SERIAL_NUMBER_STR_REF dis_serial_number -#define BT_GATT_DIS_FW_REV_STR_REF dis_fw_rev -#define BT_GATT_DIS_HW_REV_STR_REF dis_hw_rev -#define BT_GATT_DIS_SW_REV_STR_REF dis_sw_rev +#define BT_DIS_MODEL_REF dis_model +#define BT_DIS_MANUF_REF dis_manuf +#define BT_DIS_SERIAL_NUMBER_STR_REF dis_serial_number +#define BT_DIS_FW_REV_STR_REF dis_fw_rev +#define BT_DIS_HW_REV_STR_REF dis_hw_rev +#define BT_DIS_SW_REV_STR_REF dis_sw_rev -#else /* CONFIG_BT_GATT_DIS_SETTINGS */ +#else /* CONFIG_BT_DIS_SETTINGS */ -#define BT_GATT_DIS_MODEL_REF CONFIG_BT_GATT_DIS_MODEL -#define BT_GATT_DIS_MANUF_REF CONFIG_BT_GATT_DIS_MANUF -#define BT_GATT_DIS_SERIAL_NUMBER_STR_REF CONFIG_BT_GATT_DIS_SERIAL_NUMBER_STR -#define BT_GATT_DIS_FW_REV_STR_REF CONFIG_BT_GATT_DIS_FW_REV_STR -#define BT_GATT_DIS_HW_REV_STR_REF CONFIG_BT_GATT_DIS_HW_REV_STR -#define BT_GATT_DIS_SW_REV_STR_REF CONFIG_BT_GATT_DIS_SW_REV_STR +#define BT_DIS_MODEL_REF CONFIG_BT_DIS_MODEL +#define BT_DIS_MANUF_REF CONFIG_BT_DIS_MANUF +#define BT_DIS_SERIAL_NUMBER_STR_REF CONFIG_BT_DIS_SERIAL_NUMBER_STR +#define BT_DIS_FW_REV_STR_REF CONFIG_BT_DIS_FW_REV_STR +#define BT_DIS_HW_REV_STR_REF CONFIG_BT_DIS_HW_REV_STR +#define BT_DIS_SW_REV_STR_REF CONFIG_BT_DIS_SW_REV_STR -#endif /* CONFIG_BT_GATT_DIS_SETTINGS */ +#endif /* CONFIG_BT_DIS_SETTINGS */ static ssize_t read_str(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, @@ -91,7 +91,7 @@ static ssize_t read_str(struct bt_conn *conn, strlen(attr->user_data)); } -#if CONFIG_BT_GATT_DIS_PNP +#if CONFIG_BT_DIS_PNP static ssize_t read_pnp_id(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) @@ -107,41 +107,41 @@ BT_GATT_SERVICE_DEFINE(dis_svc, BT_GATT_CHARACTERISTIC(BT_UUID_DIS_MODEL_NUMBER, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, - read_str, NULL, BT_GATT_DIS_MODEL_REF), + read_str, NULL, BT_DIS_MODEL_REF), BT_GATT_CHARACTERISTIC(BT_UUID_DIS_MANUFACTURER_NAME, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, - read_str, NULL, BT_GATT_DIS_MANUF_REF), -#if CONFIG_BT_GATT_DIS_PNP + read_str, NULL, BT_DIS_MANUF_REF), +#if CONFIG_BT_DIS_PNP BT_GATT_CHARACTERISTIC(BT_UUID_DIS_PNP_ID, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_pnp_id, NULL, &dis_pnp_id), #endif -#if defined(CONFIG_BT_GATT_DIS_SERIAL_NUMBER) +#if defined(CONFIG_BT_DIS_SERIAL_NUMBER) BT_GATT_CHARACTERISTIC(BT_UUID_DIS_SERIAL_NUMBER, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_str, NULL, - BT_GATT_DIS_SERIAL_NUMBER_STR_REF), + BT_DIS_SERIAL_NUMBER_STR_REF), #endif -#if defined(CONFIG_BT_GATT_DIS_FW_REV) +#if defined(CONFIG_BT_DIS_FW_REV) BT_GATT_CHARACTERISTIC(BT_UUID_DIS_FIRMWARE_REVISION, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, - read_str, NULL, BT_GATT_DIS_FW_REV_STR_REF), + read_str, NULL, BT_DIS_FW_REV_STR_REF), #endif -#if defined(CONFIG_BT_GATT_DIS_HW_REV) +#if defined(CONFIG_BT_DIS_HW_REV) BT_GATT_CHARACTERISTIC(BT_UUID_DIS_HARDWARE_REVISION, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, - read_str, NULL, BT_GATT_DIS_HW_REV_STR_REF), + read_str, NULL, BT_DIS_HW_REV_STR_REF), #endif -#if defined(CONFIG_BT_GATT_DIS_SW_REV) +#if defined(CONFIG_BT_DIS_SW_REV) BT_GATT_CHARACTERISTIC(BT_UUID_DIS_SOFTWARE_REVISION, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, - read_str, NULL, BT_GATT_DIS_SW_REV_STR_REF), + read_str, NULL, BT_DIS_SW_REV_STR_REF), #endif ); -#if defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_GATT_DIS_SETTINGS) +#if defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_DIS_SETTINGS) static int dis_set(const char *name, size_t len_rd, settings_read_cb read_cb, void *store) { @@ -174,7 +174,7 @@ static int dis_set(const char *name, size_t len_rd, } return 0; } -#if defined(CONFIG_BT_GATT_DIS_SERIAL_NUMBER) +#if defined(CONFIG_BT_DIS_SERIAL_NUMBER) if (!strncmp(name, "serial", nlen)) { len = read_cb(store, &dis_serial_number, sizeof(dis_serial_number) - 1); @@ -189,7 +189,7 @@ static int dis_set(const char *name, size_t len_rd, return 0; } #endif -#if defined(CONFIG_BT_GATT_DIS_FW_REV) +#if defined(CONFIG_BT_DIS_FW_REV) if (!strncmp(name, "fw", nlen)) { len = read_cb(store, &dis_fw_rev, sizeof(dis_fw_rev) - 1); if (len < 0) { @@ -203,7 +203,7 @@ static int dis_set(const char *name, size_t len_rd, return 0; } #endif -#if defined(CONFIG_BT_GATT_DIS_HW_REV) +#if defined(CONFIG_BT_DIS_HW_REV) if (!strncmp(name, "hw", nlen)) { len = read_cb(store, &dis_hw_rev, sizeof(dis_hw_rev) - 1); if (len < 0) { @@ -217,7 +217,7 @@ static int dis_set(const char *name, size_t len_rd, return 0; } #endif -#if defined(CONFIG_BT_GATT_DIS_SW_REV) +#if defined(CONFIG_BT_DIS_SW_REV) if (!strncmp(name, "sw", nlen)) { len = read_cb(store, &dis_sw_rev, sizeof(dis_sw_rev) - 1); if (len < 0) { @@ -236,4 +236,4 @@ static int dis_set(const char *name, size_t len_rd, SETTINGS_STATIC_HANDLER_DEFINE(bt_dis, "bt/dis", NULL, dis_set, NULL, NULL); -#endif /* CONFIG_BT_GATT_DIS_SETTINGS && CONFIG_BT_SETTINGS*/ +#endif /* CONFIG_BT_DIS_SETTINGS && CONFIG_BT_SETTINGS*/