Bluetooth: controller: Reuse safer bt_rand in thread call path
Reuse the thread safe bt_rand() interface in the controller. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
294c68d087
commit
499baff333
1 changed files with 1 additions and 8 deletions
|
@ -5759,20 +5759,13 @@ static u32_t access_addr_get(void)
|
|||
u8_t transitions;
|
||||
u8_t bit_idx;
|
||||
u8_t retry;
|
||||
u8_t len;
|
||||
|
||||
retry = 3;
|
||||
again:
|
||||
LL_ASSERT(retry);
|
||||
retry--;
|
||||
|
||||
len = sizeof(u32_t);
|
||||
while (len) {
|
||||
len = rand_get(len, (u8_t *)&access_addr);
|
||||
if (len) {
|
||||
cpu_sleep();
|
||||
}
|
||||
}
|
||||
bt_rand(&access_addr, sizeof(u32_t));
|
||||
|
||||
bit_idx = 31;
|
||||
transitions = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue