1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include <zephyr/fff.h>
9 
10 /* List of fakes used by this unit tester */
11 #define HCI_CORE_MOCKS_FFF_FAKES_LIST(FAKE)                                                        \
12 	FAKE(bt_hci_cmd_create)                                                                    \
13 	FAKE(bt_hci_cmd_send_sync)                                                                 \
14 	FAKE(bt_hci_le_read_remote_features)                                                       \
15 	FAKE(bt_hci_disconnect)                                                                    \
16 	FAKE(bt_le_conn_params_valid)                                                              \
17 	FAKE(bt_tx_irq_raise)                                                                      \
18 	FAKE(bt_send)                                                                              \
19 	FAKE(bt_send_one_host_num_completed_packets)                                               \
20 	FAKE(bt_acl_set_ncp_sent)                                                                  \
21 	FAKE(bt_le_create_conn)                                                                    \
22 	FAKE(bt_le_create_conn_cancel)                                                             \
23 	FAKE(bt_le_create_conn_synced)                                                             \
24 	FAKE(bt_lookup_id_addr)                                                                    \
25 	FAKE(bt_le_set_phy)
26 
27 DECLARE_FAKE_VALUE_FUNC(struct net_buf *, bt_hci_cmd_create, uint16_t, uint8_t);
28 DECLARE_FAKE_VALUE_FUNC(int, bt_hci_cmd_send_sync, uint16_t, struct net_buf *, struct net_buf **);
29 DECLARE_FAKE_VALUE_FUNC(int, bt_hci_le_read_remote_features, struct bt_conn *);
30 DECLARE_FAKE_VALUE_FUNC(int, bt_hci_disconnect, uint16_t, uint8_t);
31 DECLARE_FAKE_VALUE_FUNC(bool, bt_le_conn_params_valid, const struct bt_le_conn_param *);
32 DECLARE_FAKE_VOID_FUNC(bt_tx_irq_raise);
33 DECLARE_FAKE_VALUE_FUNC(int, bt_send, struct net_buf *);
34 DECLARE_FAKE_VOID_FUNC(bt_send_one_host_num_completed_packets, uint16_t);
35 DECLARE_FAKE_VOID_FUNC(bt_acl_set_ncp_sent, struct net_buf *, bool);
36 DECLARE_FAKE_VALUE_FUNC(int, bt_le_create_conn, const struct bt_conn *);
37 DECLARE_FAKE_VALUE_FUNC(int, bt_le_create_conn_cancel);
38 DECLARE_FAKE_VALUE_FUNC(int, bt_le_create_conn_synced, const struct bt_conn *,
39 			const struct bt_le_ext_adv *, uint8_t);
40 DECLARE_FAKE_VALUE_FUNC(const bt_addr_le_t *, bt_lookup_id_addr, uint8_t, const bt_addr_le_t *);
41 DECLARE_FAKE_VALUE_FUNC(int, bt_le_set_phy, struct bt_conn *, uint8_t, uint8_t, uint8_t, uint8_t);
42