diff --git a/port/stm32-f4discovery-cc256x/src/port.c b/port/stm32-f4discovery-cc256x/src/port.c index 12164151e..7b41be6a9 100644 --- a/port/stm32-f4discovery-cc256x/src/port.c +++ b/port/stm32-f4discovery-cc256x/src/port.c @@ -3,7 +3,7 @@ #include "btstack_debug.h" #include "btstack_chipset_cc256x.h" #include "btstack_run_loop_embedded.h" -#include "classic/btstack_link_key_db_fixed.h" +#include "classic/btstack_link_key_db_static.h" #include "classic/btstack_link_key_db_tlv.h" #include "hal_flash_sector.h" #include "btstack_tlv.h" diff --git a/src/classic/btstack_link_key_db_fixed.c b/src/classic/btstack_link_key_db_static.c similarity index 88% rename from src/classic/btstack_link_key_db_fixed.c rename to src/classic/btstack_link_key_db_static.c index 6545ec27c..98b8723c5 100644 --- a/src/classic/btstack_link_key_db_fixed.c +++ b/src/classic/btstack_link_key_db_static.c @@ -35,13 +35,14 @@ * */ -#define __BTSTACK_FILE__ "btstack_link_key_db_fixed.c" +#define __BTSTACK_FILE__ "btstack_link_key_db_static.c" /* - * btstack_link_key_db_fixed.c + * btstack_link_key_db_static.c * - * Fixed Link Key implemenetation to use during development/porting - * Link keys have to be manually added to this file to make them usable + * Static Link Key implementation to use during development/porting: + * - Link keys have to be manually added to this file to make them usable + * + Link keys are preserved on reflash in constrast to the program flash based link key store */ #include "classic/btstack_link_key_db.h" @@ -76,7 +77,7 @@ static char *link_key_to_str(link_key_t link_key){ return (char *) link_key_to_str_buffer; } -static int sscanf_link_key(char * link_key_string, link_key_t link_key){ +static int sscanf_link_key(const char * link_key_string, link_key_t link_key){ unsigned int buffer[LINK_KEY_LEN]; // reset result buffer @@ -133,7 +134,7 @@ static void link_key_db_put_link_key(bd_addr_t bd_addr, link_key_t link_key, lin static void link_key_db_set_local_bd_addr(bd_addr_t bd_addr){ } -const btstack_link_key_db_t btstack_link_key_db_fixed = { +const btstack_link_key_db_t btstack_link_key_db_static = { link_key_db_init, link_key_db_set_local_bd_addr, link_key_db_close, @@ -142,6 +143,6 @@ const btstack_link_key_db_t btstack_link_key_db_fixed = { link_key_db_delete_link_key, }; -const btstack_link_key_db_t * btstack_link_key_db_fixed_instance(void){ - return &btstack_link_key_db_fixed; +const btstack_link_key_db_t * btstack_link_key_db_static_instance(void){ + return &btstack_link_key_db_static; } diff --git a/src/classic/btstack_link_key_db_fixed.h b/src/classic/btstack_link_key_db_static.h similarity index 81% rename from src/classic/btstack_link_key_db_fixed.h rename to src/classic/btstack_link_key_db_static.h index b010f33a6..91e6ec51f 100644 --- a/src/classic/btstack_link_key_db_fixed.h +++ b/src/classic/btstack_link_key_db_static.h @@ -36,11 +36,13 @@ */ /** - * interface to provide link key storage + * Static Link Key implementation to use during development/porting: + * - Link keys have to be manually added to this file to make them usable + * + Link keys are preserved on reflash in constrast to the program flash based link key store */ -#ifndef __BTSTACK_LINK_KEY_DB_FIXED_H -#define __BTSTACK_LINK_KEY_DB_FIXED_H +#ifndef __BTSTACK_LINK_KEY_DB_STATIC_H +#define __BTSTACK_LINK_KEY_DB_STATIC_H #include "btstack_link_key_db.h" @@ -51,7 +53,7 @@ extern "C" { /* * @brief */ -const btstack_link_key_db_t * btstack_link_key_db_fixed_instance(void); +const btstack_link_key_db_t * btstack_link_key_db_static_instance(void); /* API_END */ @@ -59,4 +61,4 @@ const btstack_link_key_db_t * btstack_link_key_db_fixed_instance(void); } #endif -#endif // __BTSTACK_LINK_KEY_DB_FIXED_H +#endif // __BTSTACK_LINK_KEY_DB_STATIC_H