1 /*
2  * Copyright (c) 2021 Demant
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/ztest.h>
8 
9 #include <zephyr/kernel.h>
10 
11 #include "hal/ccm.h"
12 #include "hal/ticker.h"
13 #include "hal/cpu.h"
14 
15 #include "util/util.h"
16 #include "util/mem.h"
17 #include "util/memq.h"
18 #include "util/dbuf.h"
19 #include "util/mayfly.h"
20 #include "util/mfifo.h"
21 #include "ticker/ticker.h"
22 
23 #include "pdu_df.h"
24 #include "lll/pdu_vendor.h"
25 #include "pdu.h"
26 #include "lll.h"
27 #include "lll/lll_df_types.h"
28 #include "lll_conn.h"
29 
30 #include "ull_tx_queue.h"
31 
32 #include "isoal.h"
33 #include "ull_iso_types.h"
34 #include "ull_conn_types.h"
35 #include "lll_conn_iso.h"
36 #include "ull_conn_iso_types.h"
37 #include "ull_conn_internal.h"
38 #include "ull_conn_iso_internal.h"
39 #include "ull_internal.h"
40 #include "lll/lll_vendor.h"
41 
42 #include "hal/debug.h"
43 
44 static struct ll_conn_iso_group cig = { 0 };
45 static struct ll_conn_iso_stream cis = { .established = 1, .group = &cig };
46 
ll_conn_iso_stream_get_by_acl(struct ll_conn * conn,uint16_t * cis_iter)47 __weak struct ll_conn_iso_stream *ll_conn_iso_stream_get_by_acl(struct ll_conn *conn,
48 								uint16_t *cis_iter)
49 {
50 	return NULL;
51 }
52 
ll_conn_iso_stream_get(uint16_t handle)53 __weak struct ll_conn_iso_stream *ll_conn_iso_stream_get(uint16_t handle)
54 {
55 	return &cis;
56 }
57 
ll_iso_stream_connected_get(uint16_t handle)58 struct ll_conn_iso_stream *ll_iso_stream_connected_get(uint16_t handle)
59 {
60 	return NULL;
61 }
62 
ll_conn_iso_group_get_by_id(uint8_t id)63 struct ll_conn_iso_group *ll_conn_iso_group_get_by_id(uint8_t id)
64 {
65 	return &cig;
66 }
67 
ll_conn_iso_stream_get_by_group(struct ll_conn_iso_group * cig,uint16_t * handle_iter)68 struct ll_conn_iso_stream *ll_conn_iso_stream_get_by_group(struct ll_conn_iso_group *cig,
69 							   uint16_t *handle_iter)
70 {
71 	return NULL;
72 }
73 
ull_conn_iso_cis_stop(struct ll_conn_iso_stream * cis,ll_iso_stream_released_cb_t cis_released_cb,uint8_t reason)74 void ull_conn_iso_cis_stop(struct ll_conn_iso_stream *cis,
75 			   ll_iso_stream_released_cb_t cis_released_cb,
76 			   uint8_t reason)
77 {
78 
79 }
80 
ull_conn_iso_cis_stop_by_id(uint8_t cig_id,uint8_t cis_id,uint8_t reason)81 void ull_conn_iso_cis_stop_by_id(uint8_t cig_id, uint8_t cis_id, uint8_t reason)
82 {
83 
84 }
85 
ull_conn_iso_start(struct ll_conn * conn,uint16_t cis_handle,uint32_t ticks_at_expire,uint32_t remainder,uint16_t instant_latency)86 void ull_conn_iso_start(struct ll_conn *conn, uint16_t cis_handle,
87 			uint32_t ticks_at_expire, uint32_t remainder,
88 			uint16_t instant_latency)
89 {
90 
91 }
92