Enabled timer at MAC and SCH [Issue-ID: ODUHIGH-283]
[o-du/l2.git] / src / 5gnrmac / mac_tmr.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
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 #include "common_def.h"
20 #include "lrg.h"           /* Layer manager interface includes*/
21 #include "lrg.x"           /* layer management typedefs for MAC */
22 #include "du_app_mac_inf.h"
23 #include "mac_sch_interface.h"
24 #include "lwr_mac_upr_inf.h"
25 #include "mac.h"
26
27 /**
28  * @brief Timer Expiry handler.
29  *
30  * @details
31  *
32  *     Function : macTmrExpiry
33  *
34  *     This is a callback function used as an input parameter to cmPrcTmr()
35  *     to check expiry of any timer. In this function, the only concern is
36  *     about tmrEvnt=Bind timer.
37  *
38  *  @param[in]  PTR   cb,  Entry for which Timer expired
39  *  @param[in]  S16   tmrEvnt, the Timer Event
40  *  @return  uint8_t
41  *      -# ROK
42  **/
43 uint8_t macTmrExpiry(PTR cb, uint8_t tmrEvnt)
44 {
45    /* TODO : Handling of any timer event expiry */
46    return ROK;
47 }
48
49 /**
50  * @brief MAC timer call back function registered with System services
51  *
52  * @details
53  *
54  *     Function :  macActvTmr
55  *
56  *     This function is invoked for every timer activation
57  *     period expiry.
58  *
59  *  @return  S16
60  *      -# ROK
61  **/
62 short int macActvTmr(Ent ent,Inst inst)
63 {
64    /* Check if any MAC timer has expired */
65    cmPrcTmr(&macCb.tmrTqCp, macCb.tmrTq, (PFV) macTmrExpiry);
66
67    return ROK;
68
69 } /* end of rgActvTmr */
70
71 /**********************************************************************
72
73   End of file
74 **********************************************************************/