mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-10 12:31:55 +00:00
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>
21 lines
599 B
C
21 lines
599 B
C
/*
|
|
* Copyright (c) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/* Max settings key length (with all components) */
|
|
#define BT_SETTINGS_KEY_MAX 36
|
|
|
|
/* Base64-encoded string buffer size of in_size bytes */
|
|
#define BT_SETTINGS_SIZE(in_size) ((((((in_size) - 1) / 3) * 4) + 4) + 1)
|
|
|
|
/* Helpers for keys containing a bdaddr */
|
|
void bt_settings_encode_key(char *path, size_t path_size, const char *subsys,
|
|
bt_addr_le_t *addr, const char *key);
|
|
int bt_settings_decode_key(const char *key, bt_addr_le_t *addr);
|
|
|
|
void bt_settings_save_id(void);
|
|
|
|
int bt_settings_init(void);
|