Updated the bluetooth module to use static handlers. Removed the
old bt specific static registration.
The routine bt_settings_init() is still calling settings_init() which
IMO is not needed anymore.
Updates:
changed SETTINGS_REGISTER_STATIC() to SETTINGS_STATIC_HANDLER_DEFINE()
changed settings_handler_stat type to settings_handler_static type
removed NULL declarations
renamed bt_handler to bt_settingshandler, as bt_handler already exists.
renamed all bt_XXX_handler to bt_xxx_settingshandler to avoid any
overlap.
changed SETTINGS_STATIC_HANDLER_DEFINE() to create variable names from
_hname by just prepending them with settings_handler_.
updated all bt_xxx_settings_handler to just bt_xxx.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This updates all client modules to const char processing of
setting names.
Update of peripheral_dis sample
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This convenience macro wraps Z_DECL_ALIGN() and __in_section() to
simplify static definitions of structure instances gathered in dedicated
sections. Most of the time those go together, and the section name is
already closely related to the struct type, so abstracting things behind
a simpler interface reduces probability of mistakes and makes the code
clearer. A few input section names have been adjusted accordingly.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The alignment fix on struct device definitions should be done to all
such linker list tricks. Let's abstract the declaration plus alignment
with a macro and apply it to all concerned cases.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Major changes are:
- Expose settings backend API to enable custom backend support.
- Add a new CONFIG_SETTINGS_CUSTOM backend to allow registering a custom
backend.
- Change api of the handlers h_set() routines to allow for
backend-specific read callbacks.
- Provide a customizable settings_backend_init() routine for custom
backends.
- Move runtime settings support to be its own backend.
Signed-off-by: François Delawarde <fnde@oticon.com>
The Code need to be align after introduction of stream codec to
setting serialization subsystem.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Update the storage handling to take into account multiple identities.
We can save a bit of code by using the new bt_id_create() API from
within settings.c.
Also make the treatment of addr & irk parameters to bt_id_create()
consistent, in that NULL is acceptable for both of them.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Integrate the bt_keys submodule with bt_settings. Add a new
bt_keys_store() API to write keys to flash, and extend the existing
bt_keys_clear() to remove the keys from flash.
Along with this, add some helpers for genrating settings key values
containing a bluetooth address, as well as for decoding them to get
the binary bt_addr_le_t.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
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>
Introduce a basic skeleton for peristent storage based on the settings
subsystem. Also enable support for this to the peripheral sample
application, so the new code gets exersized by CI. For now, the
implementation provides the same level support as the bt_storage API
ever did, i.e. for the identity address and the IRK.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>