1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include "bs_bt_utils.h" 8 #include "argparse.h" 9 10 #define BS_SECONDS(dur_sec) ((bs_time_t)dur_sec * 1000000) 11 #define TEST_TIMEOUT_SIMULATED BS_SECONDS(70) 12 test_tick(bs_time_t HW_device_time)13void test_tick(bs_time_t HW_device_time) 14 { 15 bs_trace_debug_time(0, "Simulation ends now.\n"); 16 if (bst_result != Passed) { 17 bst_result = Failed; 18 19 bs_trace_error("Test did not pass before simulation ended.\n"); 20 } 21 } 22 test_init(void)23void test_init(void) 24 { 25 bst_ticker_set_next_tick_absolute(TEST_TIMEOUT_SIMULATED); 26 bst_result = In_progress; 27 } 28 print_address(bt_addr_le_t * addr)29void print_address(bt_addr_le_t *addr) 30 { 31 char array[BT_ADDR_LE_STR_LEN]; 32 33 bt_addr_le_to_str(addr, array, sizeof(array)); 34 printk("Address : %s\n", array); 35 } 36