Skip to content

Commit 1f335c7

Browse files
noahpnordicjm
authored andcommitted
lib: hw_id: change name "BLE" to "Bluetooth"/"BT"
Rename the option and the name string to adhere to Bluetooth naming convention. See original suggestion here: nrfconnect#25313 (comment) Signed-off-by: Noah Pendleton <[email protected]>
1 parent c77d26c commit 1f335c7

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

doc/nrf/libraries/others/hw_id.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can configure one of the following Kconfig options to choose the hardware ID
2121

2222
* :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_IMEI` - This option specifies the :term:`International Mobile (Station) Equipment Identity (IMEI)` of the modem.
2323
* :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_UUID` - This option specifies the UUID of the modem.
24-
* :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC` - This option specifies the default Bluetooth® Low Energy MAC address.
24+
* :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS` - This option specifies the Bluetooth® Device Address.
2525
* :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC` - This option specifies the MAC address of the default network interface.
2626
* :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_DEVICE_ID` - This option specifies a serial number provided by Zephyr's HW Info API.
2727

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@ Other libraries
435435

436436
|no_changes_yet_note|
437437

438+
* :ref:`lib_hw_id` library:
439+
440+
* The ``CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC`` Kconfig option has been renamed to :kconfig:option:`CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS`.
441+
438442
Shell libraries
439443
---------------
440444

include/hw_id.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
extern "C" {
2020
#endif
2121

22-
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC)
22+
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS)
2323
#define HW_ID_LEN (12 + 1)
2424
#elif defined(CONFIG_HW_ID_LIBRARY_SOURCE_DEVICE_ID)
2525
#define HW_ID_LEN (16 + 1)

lib/hw_id/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ config HW_ID_LIBRARY_SOURCE_UUID
2626
help
2727
This option requires modem firmware v1.3.0 or higher.
2828

29-
config HW_ID_LIBRARY_SOURCE_BLE_MAC
30-
bool "BLE MAC address"
29+
config HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS
30+
bool "Bluetooth Device Address"
3131
depends on BT
3232

3333
config HW_ID_LIBRARY_SOURCE_NET_MAC

lib/hw_id/hw_id.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <zephyr/kernel.h>
99

1010
/* includes for the different HW ID sources */
11-
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC)
11+
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS)
1212
#include <zephyr/bluetooth/bluetooth.h>
13-
#endif /* defined(CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC) */
13+
#endif /* defined(CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS) */
1414
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_DEVICE_ID)
1515
#include <zephyr/drivers/hwinfo.h>
1616
#endif /* defined(CONFIG_HW_ID_LIBRARY_SOURCE_DEVICE_ID) */
@@ -26,8 +26,8 @@
2626

2727
#define IMEI_LEN 15
2828

29-
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC)
30-
/* Ask BLE stack for default MAC address */
29+
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS)
30+
/* Ask Bluetooth stack for default MAC address */
3131

3232
int hw_id_get(char *buf, size_t buf_len)
3333
{
@@ -53,7 +53,7 @@ int hw_id_get(char *buf, size_t buf_len)
5353
addr.a.val[0]);
5454
return 0;
5555
}
56-
#endif /* defined(CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC) */
56+
#endif /* defined(CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS) */
5757

5858
#if defined(CONFIG_HW_ID_LIBRARY_SOURCE_DEVICE_ID)
5959
/* Directly read Device ID from registers */

samples/hw_id/overlay-ble-mac.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66
CONFIG_BT=y
7-
CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC=y
7+
CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS=y

tests/lib/hw_id/src/kconfig_override_ble.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#define CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC y
7+
#define CONFIG_HW_ID_LIBRARY_SOURCE_BT_DEVICE_ADDRESS y

0 commit comments

Comments
 (0)