samples: Bluetooth: Add missing reset of sems in iso_receive
In the iso_receive sample, the semaphores were not reset in each iteration. This caused the ISO receiver to act incorrectly and cause issues with some controllers. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
0752d60443
commit
7ec0be76ae
1 changed files with 11 additions and 0 deletions
|
@ -281,6 +281,16 @@ static struct bt_iso_big_sync_param big_sync_param = {
|
|||
.sync_timeout = 100, /* in 10 ms units */
|
||||
};
|
||||
|
||||
static void reset_semaphores(void)
|
||||
{
|
||||
k_sem_reset(&sem_per_adv);
|
||||
k_sem_reset(&sem_per_sync);
|
||||
k_sem_reset(&sem_per_sync_lost);
|
||||
k_sem_reset(&sem_per_big_info);
|
||||
k_sem_reset(&sem_big_sync);
|
||||
k_sem_reset(&sem_big_sync_lost);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct bt_le_per_adv_sync_param sync_create_param;
|
||||
|
@ -328,6 +338,7 @@ int main(void)
|
|||
printk("Success.\n");
|
||||
|
||||
do {
|
||||
reset_semaphores();
|
||||
per_adv_lost = false;
|
||||
|
||||
printk("Start scanning...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue