Lines Matching +full:sync +full:- +full:gpios

4  * SPDX-License-Identifier: Apache-2.0
46 static const struct gpio_dt_spec led_gpio = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
71 switch (data->type) { in data_cb()
74 len = MIN(data->data_len, NAME_LEN - 1); in data_cb()
75 memcpy(name, data->data, len); in data_cb()
104 bt_addr_le_to_str(info->addr, le_addr, sizeof(le_addr)); in scan_recv()
108 le_addr, info->adv_type, info->tx_power, info->rssi, name, in scan_recv()
109 (info->adv_props & BT_GAP_ADV_PROP_CONNECTABLE) != 0, in scan_recv()
110 (info->adv_props & BT_GAP_ADV_PROP_SCANNABLE) != 0, in scan_recv()
111 (info->adv_props & BT_GAP_ADV_PROP_DIRECTED) != 0, in scan_recv()
112 (info->adv_props & BT_GAP_ADV_PROP_SCAN_RESPONSE) != 0, in scan_recv()
113 (info->adv_props & BT_GAP_ADV_PROP_EXT_ADV) != 0, in scan_recv()
114 phy2str(info->primary_phy), phy2str(info->secondary_phy), in scan_recv()
115 info->interval, BT_CONN_INTERVAL_TO_US(info->interval), info->sid); in scan_recv()
117 if (!per_adv_found && info->interval) { in scan_recv()
120 per_sid = info->sid; in scan_recv()
121 per_interval_us = BT_CONN_INTERVAL_TO_US(info->interval); in scan_recv()
122 bt_addr_le_copy(&per_addr, info->addr); in scan_recv()
132 static void sync_cb(struct bt_le_per_adv_sync *sync, in sync_cb() argument
137 bt_addr_le_to_str(info->addr, le_addr, sizeof(le_addr)); in sync_cb()
141 bt_le_per_adv_sync_get_index(sync), le_addr, in sync_cb()
142 info->interval, info->interval * 5 / 4, phy2str(info->phy)); in sync_cb()
147 static void term_cb(struct bt_le_per_adv_sync *sync, in term_cb() argument
152 bt_addr_le_to_str(info->addr, le_addr, sizeof(le_addr)); in term_cb()
154 printk("PER_ADV_SYNC[%u]: [DEVICE]: %s sync terminated\n", in term_cb()
155 bt_le_per_adv_sync_get_index(sync), le_addr); in term_cb()
161 static void recv_cb(struct bt_le_per_adv_sync *sync, in recv_cb() argument
168 bt_addr_le_to_str(info->addr, le_addr, sizeof(le_addr)); in recv_cb()
169 bin2hex(buf->data, buf->len, data_str, sizeof(data_str)); in recv_cb()
173 bt_le_per_adv_sync_get_index(sync), le_addr, info->tx_power, in recv_cb()
174 info->rssi, info->cte_type, buf->len, data_str); in recv_cb()
177 static void biginfo_cb(struct bt_le_per_adv_sync *sync, in biginfo_cb() argument
182 bt_addr_le_to_str(biginfo->addr, le_addr, sizeof(le_addr)); in biginfo_cb()
189 bt_le_per_adv_sync_get_index(sync), le_addr, biginfo->sid, in biginfo_cb()
190 biginfo->num_bis, biginfo->sub_evt_count, in biginfo_cb()
191 biginfo->iso_interval, in biginfo_cb()
192 (biginfo->iso_interval * 5 / 4), in biginfo_cb()
193 biginfo->burst_number, biginfo->offset, in biginfo_cb()
194 biginfo->rep_count, biginfo->max_pdu, biginfo->sdu_interval, in biginfo_cb()
195 biginfo->max_sdu, phy2str(biginfo->phy), in biginfo_cb()
196 biginfo->framing ? "with" : "without", in biginfo_cb()
197 biginfo->encryption ? "" : "not "); in biginfo_cb()
217 if (buf->len == sizeof(count)) { in iso_recv()
218 count = sys_get_le32(buf->data); in iso_recv()
225 str_len = bin2hex(buf->data, buf->len, data_str, sizeof(data_str)); in iso_recv()
227 "%s (counter value %u)\n", chan, info->flags, info->seq_num, in iso_recv()
228 info->ts, buf->len, data_str, count); in iso_recv()
296 struct bt_le_per_adv_sync *sync; in main() local
376 printk("Creating Periodic Advertising Sync..."); in main()
385 err = bt_le_per_adv_sync_create(&sync_create_param, &sync); in main()
392 printk("Waiting for periodic sync...\n"); in main()
397 printk("Deleting Periodic Advertising Sync..."); in main()
398 err = bt_le_per_adv_sync_delete(sync); in main()
405 printk("Periodic sync established.\n"); in main()
416 printk("Deleting Periodic Advertising Sync..."); in main()
417 err = bt_le_per_adv_sync_delete(sync); in main()
424 printk("Periodic sync established.\n"); in main()
427 printk("Create BIG Sync...\n"); in main()
428 err = bt_iso_big_sync(sync, &big_sync_param, &big); in main()
436 printk("Waiting for BIG sync chan %u...\n", chan); in main()
441 printk("BIG sync chan %u successful.\n", chan); in main()
446 printk("BIG Sync Terminate..."); in main()
456 printk("BIG sync established.\n"); in main()
472 printk("Waiting for BIG sync lost chan %u...\n", chan); in main()
478 printk("BIG sync lost chan %u.\n", chan); in main()
480 printk("BIG sync lost.\n"); in main()
483 printk("Check for periodic sync lost...\n"); in main()
486 /* Periodic Sync active, go back to creating BIG Sync */ in main()
489 printk("Periodic sync lost.\n"); in main()