Lines Matching full:sync
120 static void sync_cb(struct bt_le_per_adv_sync *sync, in sync_cb() argument
128 static void term_cb(struct bt_le_per_adv_sync *sync, in term_cb() argument
131 LOG_INF("Periodic advertisement sync terminated"); in term_cb()
137 static void biginfo_cb(struct bt_le_per_adv_sync *sync, in biginfo_cb() argument
224 print_stats("Current Sync", &stats_current_sync); in iso_recv()
301 static int create_pa_sync(struct bt_le_per_adv_sync **sync) in create_pa_sync() argument
307 LOG_INF("Creating Periodic Advertising Sync"); in create_pa_sync()
315 err = bt_le_per_adv_sync_create(&sync_create_param, sync); in create_pa_sync()
317 LOG_ERR("Periodic advertisement sync create failed (err %d)", in create_pa_sync()
322 LOG_INF("Waiting for periodic sync"); in create_pa_sync()
327 LOG_INF("Deleting Periodic Advertising Sync"); in create_pa_sync()
328 err = bt_le_per_adv_sync_delete(*sync); in create_pa_sync()
330 LOG_ERR("Failed to delete Periodic advertisement sync (err %d)", in create_pa_sync()
336 LOG_INF("Periodic sync established"); in create_pa_sync()
341 static int create_big_sync(struct bt_iso_big **big, struct bt_le_per_adv_sync *sync) in create_big_sync() argument
381 err = bt_iso_big_sync(sync, &big_sync_param, big); in create_big_sync()
383 LOG_ERR("BIG sync failed (err %d)", err); in create_big_sync()
387 LOG_INF("Waiting for BIG sync"); in create_big_sync()
393 LOG_INF("BIG sync established"); in create_big_sync()
400 static int cleanup(struct bt_le_per_adv_sync *sync, struct bt_iso_big *big) in cleanup() argument
405 if (!per_adv_lost && sync) { in cleanup()
406 LOG_INF("Deleting Periodic advertisement Sync"); in cleanup()
407 pa_err = bt_le_per_adv_sync_delete(sync); in cleanup()
409 LOG_ERR("Failed to delete Periodic advertisement sync (err %d)", in cleanup()
415 LOG_INF("Terminating BIG Sync"); in cleanup()
443 struct bt_le_per_adv_sync *sync = NULL; in test_run_receiver() local
478 err = create_pa_sync(&sync); in test_run_receiver()
487 err = create_big_sync(&big, sync); in test_run_receiver()
489 (void)cleanup(sync, big); in test_run_receiver()
498 LOG_INF("BIG sync lost, returning"); in test_run_receiver()
501 return cleanup(sync, big); in test_run_receiver()