* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fapi_5g / source / api / fapi2phy / nr5g_fapi_fapi2phy_api.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2021 Intel.
4 *
5 *   Licensed under the Apache License, Version 2.0 (the "License");
6 *   you may not use this file except in compliance with the License.
7 *   You may obtain a copy of the License at
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *   Unless required by applicable law or agreed to in writing, software
12 *   distributed under the License is distributed on an "AS IS" BASIS,
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *   See the License for the specific language governing permissions and
15 *   limitations under the License.
16 *
17 *******************************************************************************/
18
19 /**
20  * @file This file defines all the functions used to send APIs
21  * from FAPI to PHY
22  *
23  **/
24
25 #ifndef NR5G_FAPI_FAPI2PHY_API_H
26 #define NR5G_FAPI_FAPI2PHY_API_H
27
28 #include "common_mac_phy_api.h"
29 #include <nr5g_fapi_std.h>
30
31 typedef struct _nr5g_fapi_fapi2phy_queue {
32     PMAC2PHY_QUEUE_EL p_send_list_head; // list head to, send to PHY
33     PMAC2PHY_QUEUE_EL p_send_list_tail; // list tail to, send to PHY
34     PMAC2PHY_QUEUE_EL p_recv_list_head; // list head received from PHY
35     PMAC2PHY_QUEUE_EL p_recv_list_tail; // list tail received from PHY
36 } nr5g_fapi_fapi2phy_queue_t,
37 *p_nr5g_fapi_fapi2phy_queue_t;
38
39 // Function definitions
40 // -----------------------------------------------------------------------------
41 PMAC2PHY_QUEUE_EL nr5g_fapi_fapi2phy_create_api_list_elem(
42     uint32_t msg_type,
43     uint16_t num_message_in_block,
44     uint32_t align_offset);
45
46 void nr5g_fapi_fapi2phy_add_to_api_list(
47     bool is_urllc,
48     PMAC2PHY_QUEUE_EL p_list_elem);
49
50 void nr5g_fapi_fapi2phy_send_api_list(
51     bool is_urllc);
52
53 void nr5g_fapi_fapi2phy_add_to_free_list(
54     PMAC2PHY_QUEUE_EL p_list_elem);
55
56 void nr5g_fapi_fapi2phy_destroy_api_list_elem(
57     PMAC2PHY_QUEUE_EL p_list_elem);
58 #endif