provide follow features implementation:
[o-du/phy.git] / fhi_lib / lib / api / xran_timer.h
index bb4cecd..56eb291 100644 (file)
@@ -1,56 +1,58 @@
-/******************************************************************************
-*
-*   Copyright (c) 2019 Intel.
-*
-*   Licensed under the Apache License, Version 2.0 (the "License");
-*   you may not use this file except in compliance with the License.
-*   You may obtain a copy of the License at
-*
-*       http://www.apache.org/licenses/LICENSE-2.0
-*
-*   Unless required by applicable law or agreed to in writing, software
-*   distributed under the License is distributed on an "AS IS" BASIS,
-*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*   See the License for the specific language governing permissions and
-*   limitations under the License.
-*
-*******************************************************************************/
-
-/**
- * @brief This file provides interface to Timing for XRAN.
- *
- * @file xran_timer.h
- * @ingroup group_lte_source_xran
- * @author Intel Corporation
- *
- **/
-
-#ifndef _XRAN_TIMER_H
-#define _XRAN_TIMER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-#define MSEC_PER_SEC 1000L
-
-#define XranIncrementSymIdx(sym_idx, numSymPerMs)  (((uint32_t)sym_idx >= (((uint32_t)numSymPerMs * MSEC_PER_SEC) - 1)) ? 0 : (uint32_t)sym_idx+1)
-#define XranDecrementSymIdx(sym_idx, numSymPerMs)  (((uint32_t)sym_idx == 0) ? (((uint32_t)numSymPerMs * MSEC_PER_SEC)) - 1) : (uint32_t)sym_idx-1)
-
-long poll_next_tick(long interval_ns);
-long sleep_next_tick(long interval);
-int timing_set_debug_stop(int value, int count);
-int timing_get_debug_stop(void);
-inline uint64_t timing_get_current_second(void);
-int timing_set_numerology(uint8_t value);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+/******************************************************************************\r
+*\r
+*   Copyright (c) 2019 Intel.\r
+*\r
+*   Licensed under the Apache License, Version 2.0 (the "License");\r
+*   you may not use this file except in compliance with the License.\r
+*   You may obtain a copy of the License at\r
+*\r
+*       http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+*   Unless required by applicable law or agreed to in writing, software\r
+*   distributed under the License is distributed on an "AS IS" BASIS,\r
+*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+*   See the License for the specific language governing permissions and\r
+*   limitations under the License.\r
+*\r
+*******************************************************************************/\r
+\r
+/**\r
+ * @brief This file provides interface to Timing for XRAN.\r
+ *\r
+ * @file xran_timer.h\r
+ * @ingroup group_lte_source_xran\r
+ * @author Intel Corporation\r
+ *\r
+ **/\r
+\r
+#ifndef _XRAN_TIMER_H\r
+#define _XRAN_TIMER_H\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#include <time.h>\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <stdint.h>\r
+\r
+#define MSEC_PER_SEC 1000L\r
+\r
+#define XranIncrementSymIdx(sym_idx, numSymPerMs)  (((uint32_t)sym_idx >= (((uint32_t)numSymPerMs * MSEC_PER_SEC) - 1)) ? 0 : (uint32_t)sym_idx+1)\r
+#define XranDecrementSymIdx(sym_idx, numSymPerMs)  (((uint32_t)sym_idx == 0) ? (((uint32_t)numSymPerMs * MSEC_PER_SEC)) - 1) : (uint32_t)sym_idx-1)\r
+\r
+uint64_t xran_tick(void);\r
+unsigned long get_ticks_diff(unsigned long curr_tick, unsigned long last_tick);\r
+long poll_next_tick(long interval_ns, unsigned long *used_tick);\r
+long sleep_next_tick(long interval);\r
+int timing_set_debug_stop(int value, int count);\r
+int timing_get_debug_stop(void);\r
+inline uint64_t timing_get_current_second(void);\r
+int timing_set_numerology(uint8_t value);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif\r