posix/btstack_link_key_db_fs_instance: only btstack_link_key_db_fs_instance is public

This commit is contained in:
Matthias Ringwald 2017-06-30 08:17:09 +02:00
parent 8e46c84798
commit 58044c3948
2 changed files with 4 additions and 27 deletions

View File

@ -79,7 +79,7 @@ static char * bd_addr_to_dash_str(bd_addr_t addr){
}
static char link_key_to_str_buffer[LINK_KEY_STR_LEN+1]; // 11223344556677889900112233445566\0
char *link_key_to_str(link_key_t link_key){
static char *link_key_to_str(link_key_t link_key){
char * p = link_key_to_str_buffer;
int i;
for (i = 0; i < LINK_KEY_LEN ; i++) {
@ -91,12 +91,12 @@ char *link_key_to_str(link_key_t link_key){
}
static char link_key_type_to_str_buffer[2];
char *link_key_type_to_str(link_key_type_t link_key){
static char *link_key_type_to_str(link_key_type_t link_key){
snprintf(link_key_type_to_str_buffer, sizeof(link_key_type_to_str_buffer), "%d", link_key);
return (char *) link_key_type_to_str_buffer;
}
int sscanf_link_key(char * addr_string, link_key_t link_key){
static int sscanf_link_key(char * addr_string, link_key_t link_key){
unsigned int buffer[LINK_KEY_LEN];
// reset result buffer
@ -190,7 +190,7 @@ static void delete_link_key(bd_addr_t bd_addr){
}
}
const btstack_link_key_db_t btstack_link_key_db_fs = {
static const btstack_link_key_db_t btstack_link_key_db_fs = {
&db_open,
&db_set_local_bd_addr,
&db_close,

View File

@ -49,29 +49,6 @@ extern "C" {
*/
const btstack_link_key_db_t * btstack_link_key_db_fs_instance(void);
/**
* @brief Create human readable represenationt of link key
* @note uses fixed global buffer
* @return pointer to Bluetooth address string
*/
char * link_key_to_str(link_key_t link_key);
/**
* @brief return string for link key type
* @note uses fixed global buffer
* @param link_key_type
* @return link_key_type as string
*/
char *link_key_type_to_str(link_key_type_t link_key_type);
/**
* @brief Parse link key string
* @param addr_strings
* @param link_key buffer for result
* @return 1 on success
*/
int sscanf_link_key(char * addr_string, link_key_t link_key);
/* API_END */
#if defined __cplusplus