bluetooth: nus: Change Kconfigs prefix to BT_ZEPHYR_NUS
To prevent future conflicts with NCS's NUS implementation, whose Kconfig's are prefixed with BT_NUS. Signed-off-by: Luis Ubieda <luisf@croxel.com>
This commit is contained in:
parent
8a88cd4805
commit
92e0d0bbfc
|
@ -37,7 +37,7 @@ Architectures
|
|||
Bluetooth
|
||||
*********
|
||||
|
||||
* Added Nordic UART Service (NUS), enabled by the :kconfig:option:`CONFIG_BT_NUS`.
|
||||
* Added Nordic UART Service (NUS), enabled by the :kconfig:option:`CONFIG_BT_ZEPHYR_NUS`.
|
||||
This Service exposes the ability to declare multiple instances of the GATT service,
|
||||
allowing multiple serial endpoints to be used for different purposes.
|
||||
|
||||
|
@ -257,6 +257,6 @@ Tests and Samples
|
|||
*****************
|
||||
|
||||
* Added snippet for easily enabling UART over Bluetooth LE by passing ``-S nus-console`` during
|
||||
``west build``. This snippet sets the :kconfig:option:`CONFIG_BT_NUS_AUTO_START_BLUETOOTH`
|
||||
``west build``. This snippet sets the :kconfig:option:`CONFIG_BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH`
|
||||
which allows non-Bluetooth samples that use the UART APIs to run without modifications
|
||||
(e.g: Console and Logging examples).
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
config UART_BT
|
||||
bool "UART over NUS Bluetooth LE"
|
||||
depends on BT_NUS
|
||||
depends on BT_ZEPHYR_NUS
|
||||
depends on DT_HAS_ZEPHYR_NUS_UART_ENABLED
|
||||
select UART_INTERRUPT_DRIVEN
|
||||
select RING_BUFFER
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
ITERABLE_SECTION_RAM(device_mutable, 4)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_NUS)
|
||||
#if defined(CONFIG_BT_ZEPHYR_NUS)
|
||||
ITERABLE_SECTION_RAM(bt_nus_inst, 4)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_NUS=y
|
||||
CONFIG_BT_ZEPHYR_NUS=y
|
||||
|
|
|
@ -4,9 +4,9 @@ CONFIG_UART_CONSOLE=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_NUS=y
|
||||
CONFIG_BT_ZEPHYR_NUS=y
|
||||
CONFIG_UART_BT=y
|
||||
CONFIG_BT_NUS_AUTO_START_BLUETOOTH=y
|
||||
CONFIG_BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH=y
|
||||
|
||||
# Bluetooth optimizations to allow larger data packets.
|
||||
CONFIG_BT_RX_STACK_SIZE=2048
|
||||
|
|
|
@ -4,9 +4,9 @@ CONFIG_UART_CONSOLE=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_NUS=y
|
||||
CONFIG_BT_ZEPHYR_NUS=y
|
||||
CONFIG_UART_BT=y
|
||||
CONFIG_BT_NUS_AUTO_START_BLUETOOTH=y
|
||||
CONFIG_BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH=y
|
||||
|
||||
# Bluetooth optimizations to allow larger data packets.
|
||||
CONFIG_BT_RX_STACK_SIZE=2048
|
||||
|
|
|
@ -20,7 +20,7 @@ Hardware support for:
|
|||
|
||||
- :kconfig:option:`CONFIG_BT`
|
||||
- :kconfig:option:`CONFIG_BT_PERIPHERAL`
|
||||
- :kconfig:option:`CONFIG_BT_NUS`
|
||||
- :kconfig:option:`CONFIG_BT_ZEPHYR_NUS`
|
||||
- :kconfig:option:`CONFIG_SERIAL`
|
||||
- :kconfig:option:`CONFIG_CONSOLE`
|
||||
- :kconfig:option:`CONFIG_UART_CONSOLE`
|
||||
|
|
|
@ -4,9 +4,9 @@ CONFIG_UART_CONSOLE=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_NUS=y
|
||||
CONFIG_BT_ZEPHYR_NUS=y
|
||||
CONFIG_UART_BT=y
|
||||
CONFIG_BT_NUS_AUTO_START_BLUETOOTH=y
|
||||
CONFIG_BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH=y
|
||||
|
||||
# Bluetooth optimizations to allow larger data packets.
|
||||
CONFIG_BT_RX_STACK_SIZE=2048
|
||||
|
|
|
@ -17,6 +17,6 @@ if(CONFIG_BT_IAS OR CONFIG_BT_IAS_CLIENT)
|
|||
add_subdirectory(ias)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BT_NUS)
|
||||
if(CONFIG_BT_ZEPHYR_NUS)
|
||||
add_subdirectory(nus)
|
||||
endif()
|
||||
|
|
|
@ -9,6 +9,6 @@ zephyr_library_sources(
|
|||
nus_inst.c
|
||||
)
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_BT_NUS_AUTO_START_BLUETOOTH
|
||||
zephyr_library_sources_ifdef(CONFIG_BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH
|
||||
bt_nus_auto_start_bt.c
|
||||
)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright (c) 2024 Croxel, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menuconfig BT_NUS
|
||||
menuconfig BT_ZEPHYR_NUS
|
||||
bool "GATT Nordic UART Service"
|
||||
|
||||
if BT_NUS
|
||||
if BT_ZEPHYR_NUS
|
||||
|
||||
config BT_NUS_DEFAULT_INSTANCE
|
||||
config BT_ZEPHYR_NUS_DEFAULT_INSTANCE
|
||||
bool "Use default NUS Service instance"
|
||||
default y if !UART_BT
|
||||
help
|
||||
|
@ -16,11 +16,11 @@ config BT_NUS_DEFAULT_INSTANCE
|
|||
BT_NUS_INST_DEFINE(), it may not be beneficial having an internal
|
||||
instance as well.
|
||||
|
||||
config BT_NUS_AUTO_START_BLUETOOTH
|
||||
config BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH
|
||||
bool "Auto-enable Bluetooth stack and start LE advertisements"
|
||||
help
|
||||
Auto-Enable the Bluetooth stack and start advertising with the NUS
|
||||
UUID. Useful to run applications that inherently do not deal with
|
||||
Bluetooth (e.g: Non-Bluetooth samples using UART over Bluetooth LE).
|
||||
|
||||
endif # BT_NUS
|
||||
endif # BT_ZEPHYR_NUS
|
||||
|
|
|
@ -49,7 +49,7 @@ int bt_nus_inst_cb_register(struct bt_nus_inst *instance, struct bt_nus_cb *cb,
|
|||
}
|
||||
|
||||
if (!instance) {
|
||||
if (IS_ENABLED(CONFIG_BT_NUS_DEFAULT_INSTANCE)) {
|
||||
if (IS_ENABLED(CONFIG_BT_ZEPHYR_NUS_DEFAULT_INSTANCE)) {
|
||||
instance = bt_nus_inst_default();
|
||||
} else {
|
||||
return -ENOTSUP;
|
||||
|
@ -72,7 +72,7 @@ int bt_nus_inst_send(struct bt_conn *conn,
|
|||
}
|
||||
|
||||
if (!instance) {
|
||||
if (IS_ENABLED(CONFIG_BT_NUS_DEFAULT_INSTANCE)) {
|
||||
if (IS_ENABLED(CONFIG_BT_ZEPHYR_NUS_DEFAULT_INSTANCE)) {
|
||||
instance = bt_nus_inst_default();
|
||||
} else {
|
||||
return -ENOTSUP;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "nus_internal.h"
|
||||
|
||||
#if defined(CONFIG_BT_NUS_DEFAULT_INSTANCE)
|
||||
#if defined(CONFIG_BT_ZEPHYR_NUS_DEFAULT_INSTANCE)
|
||||
BT_NUS_INST_DEFINE(nus_def);
|
||||
struct bt_nus_inst *bt_nus_inst_default(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue