Skip to content

Commit b0cda43

Browse files
MirkoCovizzieivindj-nordic
authored andcommitted
lib: peer_manager: refactor PM_SERVICE_CHANGED dependencies
If not using a GATT server, or using a server without a service changed characteristic, this Kconfig option should be disabled to save code space. Refactors this Kconfig option in order to represent this relationship accordingly. Signed-off-by: Mirko Covizzi <[email protected]>
1 parent bc94ce7 commit b0cda43

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

doc/nrf-bm/release_notes/release_notes_changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Libraries
6565
* The ``CONFIG_PM_PEER_RANKS_ENABLED`` Kconfig option is renamed to :kconfig:option:`CONFIG_PM_PEER_RANKS`.
6666
* The ``CONFIG_PM_LESC_ENABLED`` Kconfig option is renamed to :kconfig:option:`CONFIG_PM_LESC`.
6767
* The ``CONFIG_PM_RA_PROTECTION_ENABLED`` Kconfig option is renamed to :kconfig:option:`CONFIG_PM_RA_PROTECTION`.
68+
* The :kconfig:option:`CONFIG_PM_SERVICE_CHANGED` Kconfig option to depend on the :kconfig:option:`CONFIG_NRF_SDH_BLE_SERVICE_CHANGED` Kconfig option.
6869

6970
Samples
7071
=======

lib/peer_manager/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ config PM_FLASH_BUFFERS
3939

4040
config PM_SERVICE_CHANGED
4141
bool "Service changed management for GATT server"
42+
depends on NRF_SDH_BLE_SERVICE_CHANGED
4243
default y
4344
help
4445
Disable this option to reduce memory usage if not using a GATT server, or using a server

lib/peer_manager/modules/gatt_cache_manager.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,6 @@ static int m_flag_car_handle_queried;
127127
*/
128128
static int m_flag_car_value_queried;
129129

130-
#ifdef CONFIG_PM_SERVICE_CHANGED
131-
BUILD_ASSERT(IS_ENABLED(CONFIG_PM_SERVICE_CHANGED) ||
132-
!IS_ENABLED(CONFIG_NRF_SDH_BLE_SERVICE_CHANGED),
133-
"CONFIG_PM_SERVICE_CHANGED should be enabled "
134-
"if NRF_SDH_BLE_SERVICE_CHANGED is enabled.");
135-
#else
136-
#define CONFIG_PM_SERVICE_CHANGED 1
137-
#endif
138-
139130
/**
140131
* @brief Function for resetting the module variable(s) of the GSCM module.
141132
*

0 commit comments

Comments
 (0)