Bluetooth: settings: Add support for per-submodule handlers

Add a new linker section for a list of submodule settings handlers,
and iterate the list from the various settings callbacks.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-04-27 13:24:02 +03:00 committed by Anas Nashif
commit 470349c25a
3 changed files with 69 additions and 1 deletions

View file

@ -50,3 +50,12 @@
KEEP(*(SORT_BY_NAME(".net_l2.init*")))
__net_l2_end = .;
} GROUP_LINK_IN(ROMABLE_REGION)
#if defined(CONFIG_BT_SETTINGS)
SECTION_DATA_PROLOGUE(_bt_settings_area, (OPTIONAL), SUBALIGN(4))
{
_bt_settings_start = .;
KEEP(*(SORT_BY_NAME("._bt_settings.static.*")))
_bt_settings_end = .;
} GROUP_LINK_IN(ROMABLE_REGION)
#endif