1 /*
2  * Copyright (c) 2020 Nordic Semiconductor ASA
3  * Copyright (c) 2020 Demant
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 void test_print_conn(struct ll_conn *conn);
9 uint16_t test_ctx_buffers_cnt(void);
10 void test_set_role(struct ll_conn *conn, uint8_t role);
11 void test_setup(struct ll_conn *conn);
12 void test_setup_idx(struct ll_conn *conn, uint8_t idx);
13 
14 void event_prepare(struct ll_conn *conn);
15 void event_tx_ack(struct ll_conn *conn, struct node_tx *tx);
16 void event_done(struct ll_conn *conn);
17 uint16_t event_counter(struct ll_conn *conn);
18 
19 #define lt_tx(_opcode, _conn, _param) lt_tx_real(__FILE__, __LINE__, _opcode, _conn, _param)
20 #define lt_tx_no_encode(_pdu, _conn, _param)                                                       \
21 	lt_tx_real_no_encode(__FILE__, __LINE__, _pdu, _conn, _param)
22 #define lt_rx(_opcode, _conn, _tx_ref, _param)                                                     \
23 	lt_rx_real(__FILE__, __LINE__, _opcode, _conn, _tx_ref, _param)
24 #define lt_rx_q_is_empty(_conn) lt_rx_q_is_empty_real(__FILE__, __LINE__, _conn)
25 
26 #define ut_rx_pdu(_opcode, _ntf_ref, _param)                                                       \
27 	ut_rx_pdu_real(__FILE__, __LINE__, _opcode, _ntf_ref, _param)
28 #define ut_rx_node(_opcode, _ntf_ref, _param)                                                      \
29 	ut_rx_node_real(__FILE__, __LINE__, _opcode, _ntf_ref, _param)
30 #define ut_rx_q_is_empty() ut_rx_q_is_empty_real(__FILE__, __LINE__)
31 
32 void lt_tx_real(const char *file, uint32_t line, enum helper_pdu_opcode opcode,
33 		struct ll_conn *conn, void *param);
34 void lt_tx_real_no_encode(const char *file, uint32_t line, struct pdu_data *pdu,
35 			  struct ll_conn *conn, void *param);
36 void lt_rx_real(const char *file, uint32_t line, enum helper_pdu_opcode opcode,
37 		struct ll_conn *conn, struct node_tx **tx_ref, void *param);
38 void lt_rx_q_is_empty_real(const char *file, uint32_t line, struct ll_conn *conn);
39 void ut_rx_pdu_real(const char *file, uint32_t line, enum helper_pdu_opcode opcode,
40 		    struct node_rx_pdu **ntf_ref, void *param);
41 void ut_rx_node_real(const char *file, uint32_t line, enum helper_node_opcode opcode,
42 		     struct node_rx_pdu **ntf_ref, void *param);
43 void ut_rx_q_is_empty_real(const char *file, uint32_t line);
44 
45 void release_ntf(struct node_rx_pdu *ntf);
46 void encode_pdu(enum helper_pdu_opcode opcode, struct pdu_data *pdu, void *param);
47