Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
if(CONFIG_NCS_BM)
zephyr_include_directories(include)

# SoftDevice headers are accesible without specifying the path.
if(CONFIG_SOFTDEVICE_S115)
zephyr_include_directories(include/bm/softdevice/s115)
endif()

include(cmake/version.cmake)

add_subdirectory(drivers)
Expand Down
16 changes: 9 additions & 7 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
/drivers/console/ @nrfconnect/ncs-bm

# Include
/include/*.h @nrfconnect/ncs-bm
/include/bluetooth/ @nrfconnect/ncs-bm
/include/s115/ @nrfconnect/ncs-bm @nrfconnect/ncs-dragoon
/include/bm/*.h @nrfconnect/ncs-bm
/include/bm/ble/ @nrfconnect/ncs-bm
/include/bm/lib/ @nrfconnect/ncs-bm
/include/bm/sdh/ @nrfconnect/ncs-bm
/include/bm/softdevice/ @nrfconnect/ncs-bm @nrfconnect/ncs-dragoon

# Libraries
/lib/ble_adv/ @nrfconnect/ncs-bm
Expand All @@ -54,27 +56,27 @@
/lib/zephyr_queue/ @nrfconnect/ncs-pluto

# Samples
/samples/bluetooth/ @nrfconnect/ncs-bm
/samples/ble/ @nrfconnect/ncs-bm
/samples/boot/ @nrfconnect/ncs-pluto
/samples/mcumgr/ @nrfconnect/ncs-pluto
/samples/peripherals/ @nrfconnect/ncs-bm

# Samples documentation
/samples/**/*.rst @nrfconnect/ncs-bm-doc
/samples/bluetooth/**/*.rst @nrfconnect/ncs-bm-doc
/samples/ble/**/*.rst @nrfconnect/ncs-bm-doc
/samples/peripherals/**/*.rst @nrfconnect/ncs-bm-doc

# Scripts
/scripts/ @nrfconnect/ncs-bm
/scripts/requirements-*.txt @nrfconnect/ncs-co-build-system

# Subsystems
/subsys/bluetooth/ @nrfconnect/ncs-bm
/subsys/ble/ @nrfconnect/ncs-bm
/subsys/bm_installs/ @nrfconnect/ncs-pluto
/subsys/logging/ @nrfconnect/ncs-bm
/subsys/mgmt/mcumgr/ @nrfconnect/ncs-pluto
/subsys/softdevice/ @nrfconnect/ncs-bm @nrfconnect/ncs-dragoon
/subsys/softdevice_handler/ @nrfconnect/ncs-bm
/subsys/nrf_sdh/ @nrfconnect/ncs-bm
/subsys/storage/flash_map/ @nrfconnect/ncs-pluto

# Sysbuild
Expand Down
2 changes: 1 addition & 1 deletion doc/nrf-bm/doxygen/nrf-bm.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.

INPUT = ../../../include/ \
../../../include/bluetooth/services \
../../../include/bm/ble/services \
mainpage.dox

# This tag can be used to specify the character encoding of the source files
Expand Down
2 changes: 1 addition & 1 deletion doc/nrf-bm/install_nrf_bm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ You can now proceed to test the :ref:`samples` included in this version of |BMsh

The samples can be found in the :file:`nrf-bm/samples` folder, and are divided into two subfolders:

* :file:`bluetooth` for the samples showcasing Bluetooth® LE functionalities using the SoftDevice.
* :file:`ble` for the samples showcasing Bluetooth® LE functionalities using the SoftDevice.
See :ref:`ble_samples`.
* :file:`peripherals` for the samples showcasing various peripheral functionalities that do not require the SoftDevice.
See :ref:`peripheral_samples`.
Expand Down
10 changes: 5 additions & 5 deletions doc/nrf-bm/sample/ble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This section lists the available samples for the Bluetooth® LE protocol.
:caption: Subpages
:glob:

../samples/bluetooth/ble_cgms/README.rst
../samples/bluetooth/ble_hrs/README.rst
../samples/bluetooth/hello_softdevice/README.rst
../samples/bluetooth/ble_lbs/README.rst
../samples/bluetooth/ble_nus/README.rst
../samples/ble/ble_cgms/README.rst
../samples/ble/ble_hrs/README.rst
../samples/ble/hello_softdevice/README.rst
../samples/ble/ble_lbs/README.rst
../samples/ble/ble_nus/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include <stdint.h>
#include <stdbool.h>
#include <ble.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble.h>
#include <bm/sdh/nrf_sdh_ble.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

#include <stdint.h>

#include <ble_gq.h>
#include <ble_racp.h>
#include <nrf_sdh_ble.h>
#include <bm/lib/ble_gq.h>
#include <bm/lib/ble_racp.h>
#include <bm/sdh/nrf_sdh_ble.h>
#include <zephyr/sys/util.h>

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

#include <stdint.h>
#include <stdbool.h>
#include <ble.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble.h>
#include <bm/sdh/nrf_sdh_ble.h>
#include <bm/lib/ble_conn_params.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#define BLE_LBS_H__

#include <stdint.h>
#include <ble.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble.h>
#include <bm/sdh/nrf_sdh_ble.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#include <stdint.h>
#include <stdbool.h>
#include <ble.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble.h>
#include <bm/sdh/nrf_sdh_ble.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef BLE_SERVICES_COMMON_H__
#define BLE_SERVICES_COMMON_H__

#include <ble.h>
#include <softdevice/ble.h>
#include <zephyr/sys/byteorder.h>

#ifdef __cplusplus
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions include/ble_adv.h → include/bm/lib/ble_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

#include <stdint.h>
#include <stdbool.h>
#include <ble_adv_data.h>
#include <ble.h>
#include <ble_gap.h>
#include <ble_gattc.h>
#include <bm/lib/ble_adv_data.h>
#include <softdevice/ble.h>
#include <softdevice/ble_gap.h>
#include <softdevice/ble_gattc.h>

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions include/ble_adv_data.h → include/bm/lib/ble_adv_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include <stdint.h>
#include <stdbool.h>
#include <ble.h>
#include <ble_types.h>
#include <softdevice/ble.h>
#include <softdevice/ble_types.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define BLE_CONN_PARAMS_H__

#include <stdint.h>
#include <ble_gap.h>
#include <softdevice/ble_gap.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion include/ble_gq.h → include/bm/lib/ble_gq.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <stddef.h>
#include <stdint.h>

#include <nrf_sdh_ble.h>
#include <bm/sdh/nrf_sdh_ble.h>

#include <zephyr/kernel.h>
#include <zephyr/sys/slist.h>
Expand Down
4 changes: 2 additions & 2 deletions include/ble_qwr.h → include/bm/lib/ble_qwr.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ extern "C" {

#include <stdint.h>
#include <stdbool.h>
#include <ble.h>
#include <ble_gatts.h>
#include <softdevice/ble.h>
#include <softdevice/ble_gatts.h>

/**
* @brief Macro for defining a ble_qwr instance.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion include/bm_buttons.h → include/bm/lib/bm_buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdbool.h>

#include <bm_timer.h>
#include <bm/lib/bm_timer.h>
#include <nrfx_gpiote.h>

#ifdef __cplusplus
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
85 changes: 85 additions & 0 deletions include/bm/nrf_error.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/**
* @defgroup nrf_error Global Error Codes
* @{
*
* @brief Global Error definitions
*/

/* Note: When the SoftDevice is enabled we include the nrf_error.h from there. */
#ifdef CONFIG_SOFTDEVICE
#include <softdevice/nrf_error.h>
#else /* CONFIG_SOFTDEVICE */

/* Header guard */
#ifndef NRF_ERROR_H__
#define NRF_ERROR_H__

#ifdef __cplusplus
extern "C" {
#endif

/** @defgroup NRF_ERRORS_BASE Error Codes Base number definitions
* @{
*/

/** Global error base */
#define NRF_ERROR_BASE_NUM (0x0)
/** @} */

/** Successful command */
#define NRF_SUCCESS (NRF_ERROR_BASE_NUM + 0)
/** SVC handler is missing */
#define NRF_ERROR_SVC_HANDLER_MISSING (NRF_ERROR_BASE_NUM + 1)
/** SoftDevice has not been enabled */
#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2)
/** Internal Error */
#define NRF_ERROR_INTERNAL (NRF_ERROR_BASE_NUM + 3)
/** No Memory for operation */
#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4)
/** Not found */
#define NRF_ERROR_NOT_FOUND (NRF_ERROR_BASE_NUM + 5)
/** Not supported */
#define NRF_ERROR_NOT_SUPPORTED (NRF_ERROR_BASE_NUM + 6)
/** Invalid Parameter */
#define NRF_ERROR_INVALID_PARAM (NRF_ERROR_BASE_NUM + 7)
/** Invalid state, operation disallowed in this state */
#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8)
/** Invalid Length */
#define NRF_ERROR_INVALID_LENGTH (NRF_ERROR_BASE_NUM + 9)
/** Invalid Flags */
#define NRF_ERROR_INVALID_FLAGS (NRF_ERROR_BASE_NUM + 10)
/** Invalid Data */
#define NRF_ERROR_INVALID_DATA (NRF_ERROR_BASE_NUM + 11)
/** Invalid Data size */
#define NRF_ERROR_DATA_SIZE (NRF_ERROR_BASE_NUM + 12)
/** Operation timed out */
#define NRF_ERROR_TIMEOUT (NRF_ERROR_BASE_NUM + 13)
/** Null Pointer */
#define NRF_ERROR_NULL (NRF_ERROR_BASE_NUM + 14)
/** Forbidden Operation */
#define NRF_ERROR_FORBIDDEN (NRF_ERROR_BASE_NUM + 15)
/** Bad Memory Address */
#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16)
/** Busy */
#define NRF_ERROR_BUSY (NRF_ERROR_BASE_NUM + 17)
/** Maximum connection count exceeded. */
#define NRF_ERROR_CONN_COUNT (NRF_ERROR_BASE_NUM + 18)
/** Not enough resources for operation */
#define NRF_ERROR_RESOURCES (NRF_ERROR_BASE_NUM + 19)

#ifdef __cplusplus
}
#endif
#endif /* NRF_ERROR_H__ */

#endif /* CONFIG_SOFTDEVICE */

/**
* @}
*/
File renamed without changes.
2 changes: 1 addition & 1 deletion include/nrf_sdh_ble.h → include/bm/sdh/nrf_sdh_ble.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define NRF_SDH_BLE_H__

#include <stdint.h>
#include <ble.h>
#include <softdevice/ble.h>
#include <zephyr/sys/iterable_sections.h>

#ifdef __cplusplus
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/ble_adv/ble_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#include "zephyr/toolchain.h"
#include <ble_adv.h>
#include <ble_adv_data.h>
#include <nrf_sdh_ble.h>
#include <bm/lib/ble_adv.h>
#include <bm/lib/ble_adv_data.h>
#include <bm/sdh/nrf_sdh_ble.h>
#include <zephyr/logging/log.h>
#include <errno.h>

Expand Down
4 changes: 2 additions & 2 deletions lib/ble_adv/ble_adv_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <stdint.h>
#include <string.h>
#include <ble_adv_data.h>
#include <ble_gap.h>
#include <bm/lib/ble_adv_data.h>
#include <softdevice/ble_gap.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
#include <errno.h>
Expand Down
10 changes: 5 additions & 5 deletions lib/ble_conn_params/att_mtu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#include <ble_gap.h>
#include <ble_gatts.h>
#include <ble_gattc.h>
#include <ble_conn_params.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble_gap.h>
#include <softdevice/ble_gatts.h>
#include <softdevice/ble_gattc.h>
#include <bm/lib/ble_conn_params.h>
#include <bm/sdh/nrf_sdh_ble.h>
#include <zephyr/logging/log.h>

LOG_MODULE_DECLARE(ble_conn_params, CONFIG_BLE_CONN_PARAMS_LOG_LEVEL);
Expand Down
8 changes: 4 additions & 4 deletions lib/ble_conn_params/conn_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#include <ble_gap.h>
#include <ble_conn_params.h>
#include <nrf_sdh.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble_gap.h>
#include <bm/lib/ble_conn_params.h>
#include <bm/sdh/nrf_sdh.h>
#include <bm/sdh/nrf_sdh_ble.h>
#include <zephyr/logging/log.h>

LOG_MODULE_DECLARE(ble_conn_params, CONFIG_BLE_CONN_PARAMS_LOG_LEVEL);
Expand Down
6 changes: 3 additions & 3 deletions lib/ble_conn_params/data_length.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#include <ble_gap.h>
#include <ble_conn_params.h>
#include <nrf_sdh_ble.h>
#include <softdevice/ble_gap.h>
#include <bm/sdh/nrf_sdh_ble.h>
#include <bm/lib/ble_conn_params.h>
#include <zephyr/logging/log.h>

LOG_MODULE_DECLARE(ble_conn_params, CONFIG_BLE_CONN_PARAMS_LOG_LEVEL);
Expand Down
2 changes: 1 addition & 1 deletion lib/ble_conn_params/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <stddef.h>
#include <ble_conn_params.h>
#include <bm/lib/ble_conn_params.h>
#include <zephyr/logging/log.h>

LOG_MODULE_REGISTER(ble_conn_params, CONFIG_BLE_CONN_PARAMS_LOG_LEVEL);
Expand Down
Loading
Loading