blob: bb28c81edbd6ab46675fa93bb779a6bb76b27918 [file] [log] [blame]
/**
* Common functions and helpers for BSIM ADV tests
*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "bs_tracing.h"
#include "bs_types.h"
#include "bstests.h"
#include "time_machine.h"
#include <errno.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/kernel.h>
#include <zephyr/types.h>
extern enum bst_result_t bst_result;
#define ASSERT(expr, ...) \
do { \
if (!(expr)) { \
FAIL(__VA_ARGS__); \
} \
} while (0)
#define FAIL(...) \
do { \
bst_result = Failed; \
bs_trace_error_time_line(__VA_ARGS__); \
} while (0)
#define PASS(...) \
do { \
bst_result = Passed; \
bs_trace_info_time(1, __VA_ARGS__); \
} while (0)
#define TESTER_CENTRAL_ID 0
#define DUT_PERIPHERAL_ID 1
void test_tick(bs_time_t HW_device_time);
void test_init(void);
void print_address(bt_addr_le_t *addr);