Skip to content

Commit 24b546d

Browse files
committed
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 94c7261 commit 24b546d

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

lib/peer_manager/Kconfig

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

4343
config PM_SERVICE_CHANGED
4444
bool "Enable/disable the service changed management for GATT server in Peer Manager."
45+
depends on NRF_SDH_BLE_SERVICE_CHANGED
4546
default y
4647
help
4748
Enable/disable the service changed management for GATT server in Peer Manager.

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)