O-RAN E Maintenance Release contribution for ODULOW
[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
51 uint32_t xran_schedule_to_worker(enum xran_job_type_id job_type_id, struct xran_device_ctx * p_xran_dev_ctx);
52 uint16_t xran_getSfnSecStart(void);
53 void tx_cp_dl_cb(struct rte_timer *tim, void *arg);
54 void tx_cp_ul_cb(struct rte_timer *tim, void *arg);
55 void tti_to_phy_cb(struct rte_timer *tim, void *arg);
56
57 void rx_ul_deadline_full_cb(struct rte_timer *tim, void *arg);
58 void rx_ul_user_sym_cb(struct rte_timer *tim, void *arg);
59 void rx_ul_deadline_half_cb(struct rte_timer *tim, void *arg);
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif /* _XRAN_MAIN_H_ */