1 /** 2 * Common functions and helpers for this test 3 * 4 * Copyright (c) 2023 Nordic Semiconductor ASA 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #include <zephyr/sys/__assert.h> 10 11 #include <errno.h> 12 #include <stddef.h> 13 #include <stdint.h> 14 15 #include <zephyr/bluetooth/bluetooth.h> 16 #include <zephyr/bluetooth/conn.h> 17 #include <zephyr/bluetooth/gatt.h> 18 #include <zephyr/bluetooth/hci.h> 19 #include <zephyr/bluetooth/uuid.h> 20 #include <zephyr/kernel.h> 21 #include <zephyr/settings/settings.h> 22 #include <zephyr/types.h> 23 24 void bs_bt_utils_setup(void); 25 26 void clear_conn(struct bt_conn *conn); 27 void wait_connected(struct bt_conn **conn); 28 void wait_disconnected(void); 29 void disconnect(struct bt_conn *conn); 30 void scan_connect_to_first_result(void); 31 void advertise_connectable(int id); 32 33 void set_security(struct bt_conn *conn, bt_security_t sec); 34 void wait_pairing_completed(void); 35 36 void bas_subscribe(struct bt_conn *conn); 37 void wait_bas_ccc_subscription(void); 38 void bas_notify(struct bt_conn *conn); 39 void wait_bas_notification(void); 40