* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fapi_5g / source / api / fapi2phy / p5 / nr5g_fapi_fapi2phy_p5_pvt_proc.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
21  * This file consist of macros, structures and prototypes of all FAPI
22  * to PHY P5 messages
23  *
24  **/
25
26 #ifndef _NR5G_FAPI_FAP2PHY_P5_PVT_PROC_H_
27 #define _NR5G_FAPI_FAP2PHY_P5_PVT_PROC_H_
28
29 #include "nr5g_mac_phy_api.h"
30
31 //x is 32 bit variable, y is length in bytes
32 #define GETVLFRM32B(x, y)  ((x) & ((0xFFFFFFFF) >> (32 - (y << 3))))
33
34 uint8_t nr5g_fapi_config_req_to_phy_translation(
35     p_nr5g_fapi_phy_instance_t p_phy_instance,
36     fapi_config_req_t * p_fapi_req,
37     PCONFIGREQUESTStruct p_ia_config_req);
38
39 uint8_t nr5g_fapi_config_req_fill_dependent_fields(
40     PCONFIGREQUESTStruct p_ia_config_req);
41
42 uint8_t nr5g_fapi_calc_phy_tdd_period(
43     uint8_t fapi_tdd_period,
44     uint8_t n_subc_common);
45
46 uint8_t nr5g_fapi_calc_phy_tdd_period_for_n_subc_common_0(
47     uint8_t fapi_tdd_period);
48
49 uint8_t nr5g_fapi_calc_phy_tdd_period_for_n_subc_common_1(
50     uint8_t fapi_tdd_period);
51
52 uint8_t nr5g_fapi_calc_phy_tdd_period_for_n_subc_common_2(
53     uint8_t fapi_tdd_period);
54
55 uint8_t nr5g_fapi_calc_phy_tdd_period_for_n_subc_common_3(
56     uint8_t fapi_tdd_period);
57
58 uint16_t nr5g_fapi_calc_fft_size(
59     uint8_t nSubcCommon,
60     uint16_t bw);
61
62 #endif                          //_NR5G_FAPI_FAP2PHY_P5_PVT_PROC_H_