* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fhi_lib / lib / src / xran_main.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2020 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  * @brief XRAN main module header file
21  * @file xran_main.h
22  * @ingroup group_source_xran
23  * @author Intel Corporation
24  **/
25
26 #ifndef _XRAN_MAIN_H_
27 #define _XRAN_MAIN_H_
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include <stdio.h>
34 #include <unistd.h>
35 #include <sys/param.h>
36 #include <sys/queue.h>
37
38 #include <rte_timer.h>
39
40 #include "xran_dev.h"
41
42 extern uint32_t xran_lib_ota_tti[];
43 extern uint32_t xran_lib_ota_sym[];
44 extern uint32_t xran_lib_ota_sym_idx[];
45
46 extern uint16_t xran_SFN_at_Sec_Start;
47 extern uint16_t xran_max_frame;
48
49 static struct timespec sleeptime = {.tv_nsec = 1E3 }; /* 1 us */
50 uint32_t xran_schedule_to_worker(enum xran_job_type_id job_type_id, struct xran_device_ctx * p_xran_dev_ctx);
51 uint16_t xran_getSfnSecStart(void);
52 void tx_cp_dl_cb(struct rte_timer *tim, void *arg);
53 void tx_cp_ul_cb(struct rte_timer *tim, void *arg);
54 void tti_to_phy_cb(struct rte_timer *tim, void *arg);
55
56 void rx_ul_deadline_full_cb(struct rte_timer *tim, void *arg);
57 void rx_ul_user_sym_cb(struct rte_timer *tim, void *arg);
58 void rx_ul_deadline_half_cb(struct rte_timer *tim, void *arg);
59 void rx_ul_deadline_one_fourths_cb(struct rte_timer *tim, void *arg);
60 void rx_ul_deadline_three_fourths_cb(struct rte_timer *tim, void *arg);
61 void rx_ul_static_srs_cb(struct rte_timer *tim, void *arg);
62 int32_t xran_fh_rx_and_up_tx_processing(void *port_mask);
63
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif /* _XRAN_MAIN_H_ */