mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
gap: add gap_random_address_set
This commit is contained in:
parent
92feaef781
commit
a9751d73b6
@ -70,6 +70,13 @@ gap_random_address_type_t gap_random_address_get_mode(void);
|
||||
*/
|
||||
void gap_random_address_set_update_period(int period_ms);
|
||||
|
||||
/**
|
||||
* @brief Sets a fixed random address for advertising
|
||||
* @param addr
|
||||
* @note Sets random address mode to type off
|
||||
*/
|
||||
void gap_random_address_set(bd_addr_t addr);
|
||||
|
||||
/**
|
||||
* @brief Updates the connection parameters for a given LE connection
|
||||
* @param handle
|
||||
|
7
ble/sm.c
7
ble/sm.c
@ -2506,6 +2506,13 @@ void gap_random_address_set_update_period(int period_ms){
|
||||
gap_random_address_update_start();
|
||||
}
|
||||
|
||||
void gap_random_address_set(bd_addr_t addr){
|
||||
gap_random_address_set_mode(GAP_RANDOM_ADDRESS_TYPE_OFF);
|
||||
memcpy(sm_random_address, addr, 6);
|
||||
rau_state = RAU_SET_ADDRESS;
|
||||
sm_run();
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief Set Advertisement Paramters
|
||||
* @param adv_int_min
|
||||
|
Loading…
x
Reference in New Issue
Block a user