add gap_set_local_name and mark local_name as const

This commit is contained in:
matthias.ringwald@gmail.com 2014-02-06 12:56:08 +00:00
parent 20e1c31c98
commit 8e618f72c9
3 changed files with 13 additions and 1 deletions

View File

@ -97,6 +97,12 @@ gap_security_level_t gap_security_level(hci_con_handle_t con_handle);
void gap_request_security_level(hci_con_handle_t con_handle, gap_security_level_t level);
int gap_mitm_protection_required_for_security_level(gap_security_level_t level);
/** @brief sets local name
* @note has to be done before stack starts up
* @param name is not copied, make sure memory is accessible during stack startup
*/
void gap_set_local_name(const char * local_name);
#if defined __cplusplus
}
#endif

View File

@ -2004,3 +2004,9 @@ int gap_dedicated_bonding(bd_addr_t device, int mitm_protection_required){
return 0;
}
void gap_set_local_name(const char * local_name){
hci_stack->local_name = local_name;
}

View File

@ -308,7 +308,7 @@ typedef struct {
void * config;
// bsic configuration
char * local_name;
const char * local_name;
uint32_t class_of_device;
bd_addr_t local_bd_addr;
uint8_t ssp_enable;